aws_sdk_connect/operation/create_contact/_create_contact_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateContactInput {
6 /// <p>The identifier of the Amazon Connect instance. 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>
7 pub instance_id: ::std::option::Option<::std::string::String>,
8 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
9 pub client_token: ::std::option::Option<::std::string::String>,
10 /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
11 pub related_contact_id: ::std::option::Option<::std::string::String>,
12 /// <p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.</p>
13 /// <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p>
14 pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
15 /// <p>A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL | ATTACHMENT.</p>
16 pub references: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
17 /// <p>The channel for the contact</p><important>
18 /// <p>CreateContact only supports the EMAIL and VOICE channels. The following information that states other channels are supported is incorrect. We are working to update this topic.</p>
19 /// </important>
20 pub channel: ::std::option::Option<crate::types::Channel>,
21 /// <p>Indicates how the contact was initiated.</p><important>
22 /// <p>CreateContact only supports the following initiation methods:</p>
23 /// <ul>
24 /// <li>
25 /// <p>For EMAIL: OUTBOUND, AGENT_REPLY, and FLOW.</p></li>
26 /// <li>
27 /// <p>For VOICE: TRANSFER and the subtype connect:ExternalAudio.</p></li>
28 /// </ul>
29 /// <p>The following information that states other initiation methods are supported is incorrect. We are working to update this topic.</p>
30 /// </important>
31 pub initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
32 /// <p>Number of minutes the contact will be active for before expiring</p>
33 pub expiry_duration_in_minutes: ::std::option::Option<i32>,
34 /// <p>User details for the contact</p>
35 pub user_info: ::std::option::Option<crate::types::UserInfo>,
36 /// <p>Initial state of the contact when it's created</p>
37 pub initiate_as: ::std::option::Option<crate::types::InitiateAs>,
38 /// <p>The name of a the contact.</p>
39 pub name: ::std::option::Option<::std::string::String>,
40 /// <p>A description of the contact.</p>
41 pub description: ::std::option::Option<::std::string::String>,
42 /// <p>A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p>
43 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
44 /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
45 /// <p>To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with <code>SegmentAttributes</code> like { <code> "connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}</code>.</p>
46 /// </note>
47 pub segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
48 /// <p>The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Integrate Amazon Connect Contact Lens with external voice systems</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
49 pub previous_contact_id: ::std::option::Option<::std::string::String>,
50}
51impl CreateContactInput {
52 /// <p>The identifier of the Amazon Connect instance. 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>
53 pub fn instance_id(&self) -> ::std::option::Option<&str> {
54 self.instance_id.as_deref()
55 }
56 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
57 pub fn client_token(&self) -> ::std::option::Option<&str> {
58 self.client_token.as_deref()
59 }
60 /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
61 pub fn related_contact_id(&self) -> ::std::option::Option<&str> {
62 self.related_contact_id.as_deref()
63 }
64 /// <p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.</p>
65 /// <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p>
66 pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67 self.attributes.as_ref()
68 }
69 /// <p>A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL | ATTACHMENT.</p>
70 pub fn references(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
71 self.references.as_ref()
72 }
73 /// <p>The channel for the contact</p><important>
74 /// <p>CreateContact only supports the EMAIL and VOICE channels. The following information that states other channels are supported is incorrect. We are working to update this topic.</p>
75 /// </important>
76 pub fn channel(&self) -> ::std::option::Option<&crate::types::Channel> {
77 self.channel.as_ref()
78 }
79 /// <p>Indicates how the contact was initiated.</p><important>
80 /// <p>CreateContact only supports the following initiation methods:</p>
81 /// <ul>
82 /// <li>
83 /// <p>For EMAIL: OUTBOUND, AGENT_REPLY, and FLOW.</p></li>
84 /// <li>
85 /// <p>For VOICE: TRANSFER and the subtype connect:ExternalAudio.</p></li>
86 /// </ul>
87 /// <p>The following information that states other initiation methods are supported is incorrect. We are working to update this topic.</p>
88 /// </important>
89 pub fn initiation_method(&self) -> ::std::option::Option<&crate::types::ContactInitiationMethod> {
90 self.initiation_method.as_ref()
91 }
92 /// <p>Number of minutes the contact will be active for before expiring</p>
93 pub fn expiry_duration_in_minutes(&self) -> ::std::option::Option<i32> {
94 self.expiry_duration_in_minutes
95 }
96 /// <p>User details for the contact</p>
97 pub fn user_info(&self) -> ::std::option::Option<&crate::types::UserInfo> {
98 self.user_info.as_ref()
99 }
100 /// <p>Initial state of the contact when it's created</p>
101 pub fn initiate_as(&self) -> ::std::option::Option<&crate::types::InitiateAs> {
102 self.initiate_as.as_ref()
103 }
104 /// <p>The name of a the contact.</p>
105 pub fn name(&self) -> ::std::option::Option<&str> {
106 self.name.as_deref()
107 }
108 /// <p>A description of the contact.</p>
109 pub fn description(&self) -> ::std::option::Option<&str> {
110 self.description.as_deref()
111 }
112 /// <p>A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p>
113 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
114 /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
115 /// <p>To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with <code>SegmentAttributes</code> like { <code> "connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}</code>.</p>
116 /// </note>
117 pub fn segment_attributes(
118 &self,
119 ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
120 self.segment_attributes.as_ref()
121 }
122 /// <p>The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Integrate Amazon Connect Contact Lens with external voice systems</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
123 pub fn previous_contact_id(&self) -> ::std::option::Option<&str> {
124 self.previous_contact_id.as_deref()
125 }
126}
127impl ::std::fmt::Debug for CreateContactInput {
128 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
129 let mut formatter = f.debug_struct("CreateContactInput");
130 formatter.field("instance_id", &self.instance_id);
131 formatter.field("client_token", &self.client_token);
132 formatter.field("related_contact_id", &self.related_contact_id);
133 formatter.field("attributes", &self.attributes);
134 formatter.field("references", &self.references);
135 formatter.field("channel", &self.channel);
136 formatter.field("initiation_method", &self.initiation_method);
137 formatter.field("expiry_duration_in_minutes", &self.expiry_duration_in_minutes);
138 formatter.field("user_info", &self.user_info);
139 formatter.field("initiate_as", &self.initiate_as);
140 formatter.field("name", &"*** Sensitive Data Redacted ***");
141 formatter.field("description", &"*** Sensitive Data Redacted ***");
142 formatter.field("segment_attributes", &self.segment_attributes);
143 formatter.field("previous_contact_id", &self.previous_contact_id);
144 formatter.finish()
145 }
146}
147impl CreateContactInput {
148 /// Creates a new builder-style object to manufacture [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
149 pub fn builder() -> crate::operation::create_contact::builders::CreateContactInputBuilder {
150 crate::operation::create_contact::builders::CreateContactInputBuilder::default()
151 }
152}
153
154/// A builder for [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
155#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
156#[non_exhaustive]
157pub struct CreateContactInputBuilder {
158 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
159 pub(crate) client_token: ::std::option::Option<::std::string::String>,
160 pub(crate) related_contact_id: ::std::option::Option<::std::string::String>,
161 pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
162 pub(crate) references: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
163 pub(crate) channel: ::std::option::Option<crate::types::Channel>,
164 pub(crate) initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
165 pub(crate) expiry_duration_in_minutes: ::std::option::Option<i32>,
166 pub(crate) user_info: ::std::option::Option<crate::types::UserInfo>,
167 pub(crate) initiate_as: ::std::option::Option<crate::types::InitiateAs>,
168 pub(crate) name: ::std::option::Option<::std::string::String>,
169 pub(crate) description: ::std::option::Option<::std::string::String>,
170 pub(crate) segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
171 pub(crate) previous_contact_id: ::std::option::Option<::std::string::String>,
172}
173impl CreateContactInputBuilder {
174 /// <p>The identifier of the Amazon Connect instance. 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>
175 /// This field is required.
176 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177 self.instance_id = ::std::option::Option::Some(input.into());
178 self
179 }
180 /// <p>The identifier of the Amazon Connect instance. 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 set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182 self.instance_id = input;
183 self
184 }
185 /// <p>The identifier of the Amazon Connect instance. 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>
186 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
187 &self.instance_id
188 }
189 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
190 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.client_token = ::std::option::Option::Some(input.into());
192 self
193 }
194 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
195 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196 self.client_token = input;
197 self
198 }
199 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
200 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
201 &self.client_token
202 }
203 /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
204 pub fn related_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205 self.related_contact_id = ::std::option::Option::Some(input.into());
206 self
207 }
208 /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
209 pub fn set_related_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.related_contact_id = input;
211 self
212 }
213 /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
214 pub fn get_related_contact_id(&self) -> &::std::option::Option<::std::string::String> {
215 &self.related_contact_id
216 }
217 /// Adds a key-value pair to `attributes`.
218 ///
219 /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
220 ///
221 /// <p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.</p>
222 /// <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p>
223 pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
224 let mut hash_map = self.attributes.unwrap_or_default();
225 hash_map.insert(k.into(), v.into());
226 self.attributes = ::std::option::Option::Some(hash_map);
227 self
228 }
229 /// <p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.</p>
230 /// <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p>
231 pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
232 self.attributes = input;
233 self
234 }
235 /// <p>A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.</p>
236 /// <p>There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.</p>
237 pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
238 &self.attributes
239 }
240 /// Adds a key-value pair to `references`.
241 ///
242 /// To override the contents of this collection use [`set_references`](Self::set_references).
243 ///
244 /// <p>A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL | ATTACHMENT.</p>
245 pub fn references(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Reference) -> Self {
246 let mut hash_map = self.references.unwrap_or_default();
247 hash_map.insert(k.into(), v);
248 self.references = ::std::option::Option::Some(hash_map);
249 self
250 }
251 /// <p>A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL | ATTACHMENT.</p>
252 pub fn set_references(
253 mut self,
254 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
255 ) -> Self {
256 self.references = input;
257 self
258 }
259 /// <p>A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL | ATTACHMENT.</p>
260 pub fn get_references(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
261 &self.references
262 }
263 /// <p>The channel for the contact</p><important>
264 /// <p>CreateContact only supports the EMAIL and VOICE channels. The following information that states other channels are supported is incorrect. We are working to update this topic.</p>
265 /// </important>
266 /// This field is required.
267 pub fn channel(mut self, input: crate::types::Channel) -> Self {
268 self.channel = ::std::option::Option::Some(input);
269 self
270 }
271 /// <p>The channel for the contact</p><important>
272 /// <p>CreateContact only supports the EMAIL and VOICE channels. The following information that states other channels are supported is incorrect. We are working to update this topic.</p>
273 /// </important>
274 pub fn set_channel(mut self, input: ::std::option::Option<crate::types::Channel>) -> Self {
275 self.channel = input;
276 self
277 }
278 /// <p>The channel for the contact</p><important>
279 /// <p>CreateContact only supports the EMAIL and VOICE channels. The following information that states other channels are supported is incorrect. We are working to update this topic.</p>
280 /// </important>
281 pub fn get_channel(&self) -> &::std::option::Option<crate::types::Channel> {
282 &self.channel
283 }
284 /// <p>Indicates how the contact was initiated.</p><important>
285 /// <p>CreateContact only supports the following initiation methods:</p>
286 /// <ul>
287 /// <li>
288 /// <p>For EMAIL: OUTBOUND, AGENT_REPLY, and FLOW.</p></li>
289 /// <li>
290 /// <p>For VOICE: TRANSFER and the subtype connect:ExternalAudio.</p></li>
291 /// </ul>
292 /// <p>The following information that states other initiation methods are supported is incorrect. We are working to update this topic.</p>
293 /// </important>
294 /// This field is required.
295 pub fn initiation_method(mut self, input: crate::types::ContactInitiationMethod) -> Self {
296 self.initiation_method = ::std::option::Option::Some(input);
297 self
298 }
299 /// <p>Indicates how the contact was initiated.</p><important>
300 /// <p>CreateContact only supports the following initiation methods:</p>
301 /// <ul>
302 /// <li>
303 /// <p>For EMAIL: OUTBOUND, AGENT_REPLY, and FLOW.</p></li>
304 /// <li>
305 /// <p>For VOICE: TRANSFER and the subtype connect:ExternalAudio.</p></li>
306 /// </ul>
307 /// <p>The following information that states other initiation methods are supported is incorrect. We are working to update this topic.</p>
308 /// </important>
309 pub fn set_initiation_method(mut self, input: ::std::option::Option<crate::types::ContactInitiationMethod>) -> Self {
310 self.initiation_method = input;
311 self
312 }
313 /// <p>Indicates how the contact was initiated.</p><important>
314 /// <p>CreateContact only supports the following initiation methods:</p>
315 /// <ul>
316 /// <li>
317 /// <p>For EMAIL: OUTBOUND, AGENT_REPLY, and FLOW.</p></li>
318 /// <li>
319 /// <p>For VOICE: TRANSFER and the subtype connect:ExternalAudio.</p></li>
320 /// </ul>
321 /// <p>The following information that states other initiation methods are supported is incorrect. We are working to update this topic.</p>
322 /// </important>
323 pub fn get_initiation_method(&self) -> &::std::option::Option<crate::types::ContactInitiationMethod> {
324 &self.initiation_method
325 }
326 /// <p>Number of minutes the contact will be active for before expiring</p>
327 pub fn expiry_duration_in_minutes(mut self, input: i32) -> Self {
328 self.expiry_duration_in_minutes = ::std::option::Option::Some(input);
329 self
330 }
331 /// <p>Number of minutes the contact will be active for before expiring</p>
332 pub fn set_expiry_duration_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
333 self.expiry_duration_in_minutes = input;
334 self
335 }
336 /// <p>Number of minutes the contact will be active for before expiring</p>
337 pub fn get_expiry_duration_in_minutes(&self) -> &::std::option::Option<i32> {
338 &self.expiry_duration_in_minutes
339 }
340 /// <p>User details for the contact</p>
341 pub fn user_info(mut self, input: crate::types::UserInfo) -> Self {
342 self.user_info = ::std::option::Option::Some(input);
343 self
344 }
345 /// <p>User details for the contact</p>
346 pub fn set_user_info(mut self, input: ::std::option::Option<crate::types::UserInfo>) -> Self {
347 self.user_info = input;
348 self
349 }
350 /// <p>User details for the contact</p>
351 pub fn get_user_info(&self) -> &::std::option::Option<crate::types::UserInfo> {
352 &self.user_info
353 }
354 /// <p>Initial state of the contact when it's created</p>
355 pub fn initiate_as(mut self, input: crate::types::InitiateAs) -> Self {
356 self.initiate_as = ::std::option::Option::Some(input);
357 self
358 }
359 /// <p>Initial state of the contact when it's created</p>
360 pub fn set_initiate_as(mut self, input: ::std::option::Option<crate::types::InitiateAs>) -> Self {
361 self.initiate_as = input;
362 self
363 }
364 /// <p>Initial state of the contact when it's created</p>
365 pub fn get_initiate_as(&self) -> &::std::option::Option<crate::types::InitiateAs> {
366 &self.initiate_as
367 }
368 /// <p>The name of a the contact.</p>
369 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370 self.name = ::std::option::Option::Some(input.into());
371 self
372 }
373 /// <p>The name of a the contact.</p>
374 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
375 self.name = input;
376 self
377 }
378 /// <p>The name of a the contact.</p>
379 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
380 &self.name
381 }
382 /// <p>A description of the contact.</p>
383 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
384 self.description = ::std::option::Option::Some(input.into());
385 self
386 }
387 /// <p>A description of the contact.</p>
388 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
389 self.description = input;
390 self
391 }
392 /// <p>A description of the contact.</p>
393 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
394 &self.description
395 }
396 /// Adds a key-value pair to `segment_attributes`.
397 ///
398 /// To override the contents of this collection use [`set_segment_attributes`](Self::set_segment_attributes).
399 ///
400 /// <p>A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p>
401 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
402 /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
403 /// <p>To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with <code>SegmentAttributes</code> like { <code> "connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}</code>.</p>
404 /// </note>
405 pub fn segment_attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SegmentAttributeValue) -> Self {
406 let mut hash_map = self.segment_attributes.unwrap_or_default();
407 hash_map.insert(k.into(), v);
408 self.segment_attributes = ::std::option::Option::Some(hash_map);
409 self
410 }
411 /// <p>A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p>
412 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
413 /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
414 /// <p>To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with <code>SegmentAttributes</code> like { <code> "connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}</code>.</p>
415 /// </note>
416 pub fn set_segment_attributes(
417 mut self,
418 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
419 ) -> Self {
420 self.segment_attributes = input;
421 self
422 }
423 /// <p>A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in flows.</p>
424 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
425 /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
426 /// <p>To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with <code>SegmentAttributes</code> like { <code> "connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}</code>.</p>
427 /// </note>
428 pub fn get_segment_attributes(
429 &self,
430 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
431 &self.segment_attributes
432 }
433 /// <p>The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Integrate Amazon Connect Contact Lens with external voice systems</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
434 pub fn previous_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
435 self.previous_contact_id = ::std::option::Option::Some(input.into());
436 self
437 }
438 /// <p>The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Integrate Amazon Connect Contact Lens with external voice systems</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
439 pub fn set_previous_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
440 self.previous_contact_id = input;
441 self
442 }
443 /// <p>The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Integrate Amazon Connect Contact Lens with external voice systems</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
444 pub fn get_previous_contact_id(&self) -> &::std::option::Option<::std::string::String> {
445 &self.previous_contact_id
446 }
447 /// Consumes the builder and constructs a [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
448 pub fn build(
449 self,
450 ) -> ::std::result::Result<crate::operation::create_contact::CreateContactInput, ::aws_smithy_types::error::operation::BuildError> {
451 ::std::result::Result::Ok(crate::operation::create_contact::CreateContactInput {
452 instance_id: self.instance_id,
453 client_token: self.client_token,
454 related_contact_id: self.related_contact_id,
455 attributes: self.attributes,
456 references: self.references,
457 channel: self.channel,
458 initiation_method: self.initiation_method,
459 expiry_duration_in_minutes: self.expiry_duration_in_minutes,
460 user_info: self.user_info,
461 initiate_as: self.initiate_as,
462 name: self.name,
463 description: self.description,
464 segment_attributes: self.segment_attributes,
465 previous_contact_id: self.previous_contact_id,
466 })
467 }
468}
469impl ::std::fmt::Debug for CreateContactInputBuilder {
470 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
471 let mut formatter = f.debug_struct("CreateContactInputBuilder");
472 formatter.field("instance_id", &self.instance_id);
473 formatter.field("client_token", &self.client_token);
474 formatter.field("related_contact_id", &self.related_contact_id);
475 formatter.field("attributes", &self.attributes);
476 formatter.field("references", &self.references);
477 formatter.field("channel", &self.channel);
478 formatter.field("initiation_method", &self.initiation_method);
479 formatter.field("expiry_duration_in_minutes", &self.expiry_duration_in_minutes);
480 formatter.field("user_info", &self.user_info);
481 formatter.field("initiate_as", &self.initiate_as);
482 formatter.field("name", &"*** Sensitive Data Redacted ***");
483 formatter.field("description", &"*** Sensitive Data Redacted ***");
484 formatter.field("segment_attributes", &self.segment_attributes);
485 formatter.field("previous_contact_id", &self.previous_contact_id);
486 formatter.finish()
487 }
488}