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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The proxy session for an Amazon Chime SDK Voice Connector.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ProxySession {
    /// <p>The Voice Connector ID.</p>
    pub voice_connector_id: ::std::option::Option<::std::string::String>,
    /// <p>The proxy session ID.</p>
    pub proxy_session_id: ::std::option::Option<::std::string::String>,
    /// <p>The proxy session name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The proxy session status.</p>
    pub status: ::std::option::Option<crate::types::ProxySessionStatus>,
    /// <p>The number of minutes allowed for the proxy session.</p>
    pub expiry_minutes: ::std::option::Option<i32>,
    /// <p>The proxy session capabilities.</p>
    pub capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    /// <p>The created time stamp, in ISO 8601 format.</p>
    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The updated time stamp, in ISO 8601 format.</p>
    pub updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ended time stamp, in ISO 8601 format.</p>
    pub ended_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The proxy session participants.</p>
    pub participants: ::std::option::Option<::std::vec::Vec<crate::types::Participant>>,
    /// <p>The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.</p>
    pub number_selection_behavior: ::std::option::Option<crate::types::NumberSelectionBehavior>,
    /// <p>The preference for matching the country or area code of the proxy phone number with that of the first participant.</p>
    pub geo_match_level: ::std::option::Option<crate::types::GeoMatchLevel>,
    /// <p>The country and area code for the proxy phone number.</p>
    pub geo_match_params: ::std::option::Option<crate::types::GeoMatchParams>,
}
impl ProxySession {
    /// <p>The Voice Connector ID.</p>
    pub fn voice_connector_id(&self) -> ::std::option::Option<&str> {
        self.voice_connector_id.as_deref()
    }
    /// <p>The proxy session ID.</p>
    pub fn proxy_session_id(&self) -> ::std::option::Option<&str> {
        self.proxy_session_id.as_deref()
    }
    /// <p>The proxy session name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The proxy session status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ProxySessionStatus> {
        self.status.as_ref()
    }
    /// <p>The number of minutes allowed for the proxy session.</p>
    pub fn expiry_minutes(&self) -> ::std::option::Option<i32> {
        self.expiry_minutes
    }
    /// <p>The proxy session capabilities.</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 `.capabilities.is_none()`.
    pub fn capabilities(&self) -> &[crate::types::Capability] {
        self.capabilities.as_deref().unwrap_or_default()
    }
    /// <p>The created time stamp, in ISO 8601 format.</p>
    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_timestamp.as_ref()
    }
    /// <p>The updated time stamp, in ISO 8601 format.</p>
    pub fn updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_timestamp.as_ref()
    }
    /// <p>The ended time stamp, in ISO 8601 format.</p>
    pub fn ended_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ended_timestamp.as_ref()
    }
    /// <p>The proxy session participants.</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 `.participants.is_none()`.
    pub fn participants(&self) -> &[crate::types::Participant] {
        self.participants.as_deref().unwrap_or_default()
    }
    /// <p>The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.</p>
    pub fn number_selection_behavior(&self) -> ::std::option::Option<&crate::types::NumberSelectionBehavior> {
        self.number_selection_behavior.as_ref()
    }
    /// <p>The preference for matching the country or area code of the proxy phone number with that of the first participant.</p>
    pub fn geo_match_level(&self) -> ::std::option::Option<&crate::types::GeoMatchLevel> {
        self.geo_match_level.as_ref()
    }
    /// <p>The country and area code for the proxy phone number.</p>
    pub fn geo_match_params(&self) -> ::std::option::Option<&crate::types::GeoMatchParams> {
        self.geo_match_params.as_ref()
    }
}
impl ProxySession {
    /// Creates a new builder-style object to manufacture [`ProxySession`](crate::types::ProxySession).
    pub fn builder() -> crate::types::builders::ProxySessionBuilder {
        crate::types::builders::ProxySessionBuilder::default()
    }
}

/// A builder for [`ProxySession`](crate::types::ProxySession).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ProxySessionBuilder {
    pub(crate) voice_connector_id: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_session_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ProxySessionStatus>,
    pub(crate) expiry_minutes: ::std::option::Option<i32>,
    pub(crate) capabilities: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>,
    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ended_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) participants: ::std::option::Option<::std::vec::Vec<crate::types::Participant>>,
    pub(crate) number_selection_behavior: ::std::option::Option<crate::types::NumberSelectionBehavior>,
    pub(crate) geo_match_level: ::std::option::Option<crate::types::GeoMatchLevel>,
    pub(crate) geo_match_params: ::std::option::Option<crate::types::GeoMatchParams>,
}
impl ProxySessionBuilder {
    /// <p>The Voice Connector ID.</p>
    pub fn voice_connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.voice_connector_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Voice Connector ID.</p>
    pub fn set_voice_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.voice_connector_id = input;
        self
    }
    /// <p>The Voice Connector ID.</p>
    pub fn get_voice_connector_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.voice_connector_id
    }
    /// <p>The proxy session ID.</p>
    pub fn proxy_session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_session_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The proxy session ID.</p>
    pub fn set_proxy_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_session_id = input;
        self
    }
    /// <p>The proxy session ID.</p>
    pub fn get_proxy_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_session_id
    }
    /// <p>The proxy session name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The proxy session name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The proxy session name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The proxy session status.</p>
    pub fn status(mut self, input: crate::types::ProxySessionStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The proxy session status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ProxySessionStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The proxy session status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ProxySessionStatus> {
        &self.status
    }
    /// <p>The number of minutes allowed for the proxy session.</p>
    pub fn expiry_minutes(mut self, input: i32) -> Self {
        self.expiry_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of minutes allowed for the proxy session.</p>
    pub fn set_expiry_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.expiry_minutes = input;
        self
    }
    /// <p>The number of minutes allowed for the proxy session.</p>
    pub fn get_expiry_minutes(&self) -> &::std::option::Option<i32> {
        &self.expiry_minutes
    }
    /// Appends an item to `capabilities`.
    ///
    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
    ///
    /// <p>The proxy session capabilities.</p>
    pub fn capabilities(mut self, input: crate::types::Capability) -> Self {
        let mut v = self.capabilities.unwrap_or_default();
        v.push(input);
        self.capabilities = ::std::option::Option::Some(v);
        self
    }
    /// <p>The proxy session capabilities.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Capability>>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>The proxy session capabilities.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Capability>> {
        &self.capabilities
    }
    /// <p>The created time stamp, in ISO 8601 format.</p>
    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The created time stamp, in ISO 8601 format.</p>
    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_timestamp = input;
        self
    }
    /// <p>The created time stamp, in ISO 8601 format.</p>
    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_timestamp
    }
    /// <p>The updated time stamp, in ISO 8601 format.</p>
    pub fn updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated time stamp, in ISO 8601 format.</p>
    pub fn set_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_timestamp = input;
        self
    }
    /// <p>The updated time stamp, in ISO 8601 format.</p>
    pub fn get_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_timestamp
    }
    /// <p>The ended time stamp, in ISO 8601 format.</p>
    pub fn ended_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ended_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ended time stamp, in ISO 8601 format.</p>
    pub fn set_ended_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ended_timestamp = input;
        self
    }
    /// <p>The ended time stamp, in ISO 8601 format.</p>
    pub fn get_ended_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ended_timestamp
    }
    /// Appends an item to `participants`.
    ///
    /// To override the contents of this collection use [`set_participants`](Self::set_participants).
    ///
    /// <p>The proxy session participants.</p>
    pub fn participants(mut self, input: crate::types::Participant) -> Self {
        let mut v = self.participants.unwrap_or_default();
        v.push(input);
        self.participants = ::std::option::Option::Some(v);
        self
    }
    /// <p>The proxy session participants.</p>
    pub fn set_participants(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Participant>>) -> Self {
        self.participants = input;
        self
    }
    /// <p>The proxy session participants.</p>
    pub fn get_participants(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Participant>> {
        &self.participants
    }
    /// <p>The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.</p>
    pub fn number_selection_behavior(mut self, input: crate::types::NumberSelectionBehavior) -> Self {
        self.number_selection_behavior = ::std::option::Option::Some(input);
        self
    }
    /// <p>The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.</p>
    pub fn set_number_selection_behavior(mut self, input: ::std::option::Option<crate::types::NumberSelectionBehavior>) -> Self {
        self.number_selection_behavior = input;
        self
    }
    /// <p>The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.</p>
    pub fn get_number_selection_behavior(&self) -> &::std::option::Option<crate::types::NumberSelectionBehavior> {
        &self.number_selection_behavior
    }
    /// <p>The preference for matching the country or area code of the proxy phone number with that of the first participant.</p>
    pub fn geo_match_level(mut self, input: crate::types::GeoMatchLevel) -> Self {
        self.geo_match_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>The preference for matching the country or area code of the proxy phone number with that of the first participant.</p>
    pub fn set_geo_match_level(mut self, input: ::std::option::Option<crate::types::GeoMatchLevel>) -> Self {
        self.geo_match_level = input;
        self
    }
    /// <p>The preference for matching the country or area code of the proxy phone number with that of the first participant.</p>
    pub fn get_geo_match_level(&self) -> &::std::option::Option<crate::types::GeoMatchLevel> {
        &self.geo_match_level
    }
    /// <p>The country and area code for the proxy phone number.</p>
    pub fn geo_match_params(mut self, input: crate::types::GeoMatchParams) -> Self {
        self.geo_match_params = ::std::option::Option::Some(input);
        self
    }
    /// <p>The country and area code for the proxy phone number.</p>
    pub fn set_geo_match_params(mut self, input: ::std::option::Option<crate::types::GeoMatchParams>) -> Self {
        self.geo_match_params = input;
        self
    }
    /// <p>The country and area code for the proxy phone number.</p>
    pub fn get_geo_match_params(&self) -> &::std::option::Option<crate::types::GeoMatchParams> {
        &self.geo_match_params
    }
    /// Consumes the builder and constructs a [`ProxySession`](crate::types::ProxySession).
    pub fn build(self) -> crate::types::ProxySession {
        crate::types::ProxySession {
            voice_connector_id: self.voice_connector_id,
            proxy_session_id: self.proxy_session_id,
            name: self.name,
            status: self.status,
            expiry_minutes: self.expiry_minutes,
            capabilities: self.capabilities,
            created_timestamp: self.created_timestamp,
            updated_timestamp: self.updated_timestamp,
            ended_timestamp: self.ended_timestamp,
            participants: self.participants,
            number_selection_behavior: self.number_selection_behavior,
            geo_match_level: self.geo_match_level,
            geo_match_params: self.geo_match_params,
        }
    }
}