aws_sdk_connect/types/
_list_phone_numbers_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about phone numbers that have been claimed to your Amazon Connect instance or traffic distribution group.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListPhoneNumbersSummary {
7    /// <p>A unique identifier for the phone number.</p>
8    pub phone_number_id: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the phone number.</p>
10    pub phone_number_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The phone number. Phone numbers are formatted <code>\[+\] \[country code\] \[subscriber number including area code\]</code>.</p>
12    pub phone_number: ::std::option::Option<::std::string::String>,
13    /// <p>The ISO country code.</p>
14    pub phone_number_country_code: ::std::option::Option<crate::types::PhoneNumberCountryCode>,
15    /// <p>The type of phone number.</p>
16    pub phone_number_type: ::std::option::Option<crate::types::PhoneNumberType>,
17    /// <p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.</p>
18    pub target_arn: ::std::option::Option<::std::string::String>,
19    /// <p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
20    pub instance_id: ::std::option::Option<::std::string::String>,
21    /// <p>The description of the phone number.</p>
22    pub phone_number_description: ::std::option::Option<::std::string::String>,
23    /// <p>The claimed phone number ARN that was previously imported from the external service, such as Amazon Web Services End User Messaging. If it is from Amazon Web Services End User Messaging, it looks like the ARN of the phone number that was imported from Amazon Web Services End User Messaging.</p>
24    pub source_phone_number_arn: ::std::option::Option<::std::string::String>,
25}
26impl ListPhoneNumbersSummary {
27    /// <p>A unique identifier for the phone number.</p>
28    pub fn phone_number_id(&self) -> ::std::option::Option<&str> {
29        self.phone_number_id.as_deref()
30    }
31    /// <p>The Amazon Resource Name (ARN) of the phone number.</p>
32    pub fn phone_number_arn(&self) -> ::std::option::Option<&str> {
33        self.phone_number_arn.as_deref()
34    }
35    /// <p>The phone number. Phone numbers are formatted <code>\[+\] \[country code\] \[subscriber number including area code\]</code>.</p>
36    pub fn phone_number(&self) -> ::std::option::Option<&str> {
37        self.phone_number.as_deref()
38    }
39    /// <p>The ISO country code.</p>
40    pub fn phone_number_country_code(&self) -> ::std::option::Option<&crate::types::PhoneNumberCountryCode> {
41        self.phone_number_country_code.as_ref()
42    }
43    /// <p>The type of phone number.</p>
44    pub fn phone_number_type(&self) -> ::std::option::Option<&crate::types::PhoneNumberType> {
45        self.phone_number_type.as_ref()
46    }
47    /// <p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.</p>
48    pub fn target_arn(&self) -> ::std::option::Option<&str> {
49        self.target_arn.as_deref()
50    }
51    /// <p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
52    pub fn instance_id(&self) -> ::std::option::Option<&str> {
53        self.instance_id.as_deref()
54    }
55    /// <p>The description of the phone number.</p>
56    pub fn phone_number_description(&self) -> ::std::option::Option<&str> {
57        self.phone_number_description.as_deref()
58    }
59    /// <p>The claimed phone number ARN that was previously imported from the external service, such as Amazon Web Services End User Messaging. If it is from Amazon Web Services End User Messaging, it looks like the ARN of the phone number that was imported from Amazon Web Services End User Messaging.</p>
60    pub fn source_phone_number_arn(&self) -> ::std::option::Option<&str> {
61        self.source_phone_number_arn.as_deref()
62    }
63}
64impl ListPhoneNumbersSummary {
65    /// Creates a new builder-style object to manufacture [`ListPhoneNumbersSummary`](crate::types::ListPhoneNumbersSummary).
66    pub fn builder() -> crate::types::builders::ListPhoneNumbersSummaryBuilder {
67        crate::types::builders::ListPhoneNumbersSummaryBuilder::default()
68    }
69}
70
71/// A builder for [`ListPhoneNumbersSummary`](crate::types::ListPhoneNumbersSummary).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct ListPhoneNumbersSummaryBuilder {
75    pub(crate) phone_number_id: ::std::option::Option<::std::string::String>,
76    pub(crate) phone_number_arn: ::std::option::Option<::std::string::String>,
77    pub(crate) phone_number: ::std::option::Option<::std::string::String>,
78    pub(crate) phone_number_country_code: ::std::option::Option<crate::types::PhoneNumberCountryCode>,
79    pub(crate) phone_number_type: ::std::option::Option<crate::types::PhoneNumberType>,
80    pub(crate) target_arn: ::std::option::Option<::std::string::String>,
81    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
82    pub(crate) phone_number_description: ::std::option::Option<::std::string::String>,
83    pub(crate) source_phone_number_arn: ::std::option::Option<::std::string::String>,
84}
85impl ListPhoneNumbersSummaryBuilder {
86    /// <p>A unique identifier for the phone number.</p>
87    pub fn phone_number_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.phone_number_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>A unique identifier for the phone number.</p>
92    pub fn set_phone_number_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.phone_number_id = input;
94        self
95    }
96    /// <p>A unique identifier for the phone number.</p>
97    pub fn get_phone_number_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.phone_number_id
99    }
100    /// <p>The Amazon Resource Name (ARN) of the phone number.</p>
101    pub fn phone_number_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.phone_number_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The Amazon Resource Name (ARN) of the phone number.</p>
106    pub fn set_phone_number_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.phone_number_arn = input;
108        self
109    }
110    /// <p>The Amazon Resource Name (ARN) of the phone number.</p>
111    pub fn get_phone_number_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.phone_number_arn
113    }
114    /// <p>The phone number. Phone numbers are formatted <code>\[+\] \[country code\] \[subscriber number including area code\]</code>.</p>
115    pub fn phone_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.phone_number = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The phone number. Phone numbers are formatted <code>\[+\] \[country code\] \[subscriber number including area code\]</code>.</p>
120    pub fn set_phone_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.phone_number = input;
122        self
123    }
124    /// <p>The phone number. Phone numbers are formatted <code>\[+\] \[country code\] \[subscriber number including area code\]</code>.</p>
125    pub fn get_phone_number(&self) -> &::std::option::Option<::std::string::String> {
126        &self.phone_number
127    }
128    /// <p>The ISO country code.</p>
129    pub fn phone_number_country_code(mut self, input: crate::types::PhoneNumberCountryCode) -> Self {
130        self.phone_number_country_code = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The ISO country code.</p>
134    pub fn set_phone_number_country_code(mut self, input: ::std::option::Option<crate::types::PhoneNumberCountryCode>) -> Self {
135        self.phone_number_country_code = input;
136        self
137    }
138    /// <p>The ISO country code.</p>
139    pub fn get_phone_number_country_code(&self) -> &::std::option::Option<crate::types::PhoneNumberCountryCode> {
140        &self.phone_number_country_code
141    }
142    /// <p>The type of phone number.</p>
143    pub fn phone_number_type(mut self, input: crate::types::PhoneNumberType) -> Self {
144        self.phone_number_type = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>The type of phone number.</p>
148    pub fn set_phone_number_type(mut self, input: ::std::option::Option<crate::types::PhoneNumberType>) -> Self {
149        self.phone_number_type = input;
150        self
151    }
152    /// <p>The type of phone number.</p>
153    pub fn get_phone_number_type(&self) -> &::std::option::Option<crate::types::PhoneNumberType> {
154        &self.phone_number_type
155    }
156    /// <p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.</p>
157    pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.target_arn = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.</p>
162    pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.target_arn = input;
164        self
165    }
166    /// <p>The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone number inbound traffic is routed through.</p>
167    pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
168        &self.target_arn
169    }
170    /// <p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
171    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.instance_id = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
176    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.instance_id = input;
178        self
179    }
180    /// <p>The identifier of the Amazon Connect instance that phone numbers are claimed to. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
181    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
182        &self.instance_id
183    }
184    /// <p>The description of the phone number.</p>
185    pub fn phone_number_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.phone_number_description = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>The description of the phone number.</p>
190    pub fn set_phone_number_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.phone_number_description = input;
192        self
193    }
194    /// <p>The description of the phone number.</p>
195    pub fn get_phone_number_description(&self) -> &::std::option::Option<::std::string::String> {
196        &self.phone_number_description
197    }
198    /// <p>The claimed phone number ARN that was previously imported from the external service, such as Amazon Web Services End User Messaging. If it is from Amazon Web Services End User Messaging, it looks like the ARN of the phone number that was imported from Amazon Web Services End User Messaging.</p>
199    pub fn source_phone_number_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.source_phone_number_arn = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The claimed phone number ARN that was previously imported from the external service, such as Amazon Web Services End User Messaging. If it is from Amazon Web Services End User Messaging, it looks like the ARN of the phone number that was imported from Amazon Web Services End User Messaging.</p>
204    pub fn set_source_phone_number_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.source_phone_number_arn = input;
206        self
207    }
208    /// <p>The claimed phone number ARN that was previously imported from the external service, such as Amazon Web Services End User Messaging. If it is from Amazon Web Services End User Messaging, it looks like the ARN of the phone number that was imported from Amazon Web Services End User Messaging.</p>
209    pub fn get_source_phone_number_arn(&self) -> &::std::option::Option<::std::string::String> {
210        &self.source_phone_number_arn
211    }
212    /// Consumes the builder and constructs a [`ListPhoneNumbersSummary`](crate::types::ListPhoneNumbersSummary).
213    pub fn build(self) -> crate::types::ListPhoneNumbersSummary {
214        crate::types::ListPhoneNumbersSummary {
215            phone_number_id: self.phone_number_id,
216            phone_number_arn: self.phone_number_arn,
217            phone_number: self.phone_number,
218            phone_number_country_code: self.phone_number_country_code,
219            phone_number_type: self.phone_number_type,
220            target_arn: self.target_arn,
221            instance_id: self.instance_id,
222            phone_number_description: self.phone_number_description,
223            source_phone_number_arn: self.source_phone_number_arn,
224        }
225    }
226}