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: <code>URL</code> | <code>NUMBER</code> | <code>STRING</code> | <code>DATE</code> | <code>EMAIL</code> | <code>ATTACHMENT</code>.</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>The CHAT channel is not supported. The following information is incorrect. We're working to correct it.</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. Valid values by channel are:</p>
23    /// <ul>
24    /// <li>
25    /// <p>For VOICE: <code>TRANSFER</code> and the subtype <code>connect:ExternalAudio</code></p></li>
26    /// <li>
27    /// <p>For EMAIL: <code>OUTBOUND</code> | <code>AGENT_REPLY</code> | <code>FLOW</code></p></li>
28    /// <li>
29    /// <p>For TASK: <code>API</code></p></li>
30    /// </ul>
31    /// <p>The other channels listed below are incorrect. We're working to correct this information.</p>
32    /// </important>
33    pub initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
34    /// <p>Number of minutes the contact will be active for before expiring</p>
35    pub expiry_duration_in_minutes: ::std::option::Option<i32>,
36    /// <p>User details for the contact</p><important>
37    /// <p>UserInfo is required when creating an EMAIL contact with <code>OUTBOUND</code> and <code>AGENT_REPLY</code> contact initiation methods.</p>
38    /// </important>
39    pub user_info: ::std::option::Option<crate::types::UserInfo>,
40    /// <p>Initial state of the contact when it's created. Only TASK channel contacts can be initiated with <code>COMPLETED</code> state.</p>
41    pub initiate_as: ::std::option::Option<crate::types::InitiateAs>,
42    /// <p>The name of a the contact.</p>
43    pub name: ::std::option::Option<::std::string::String>,
44    /// <p>A description of the contact.</p>
45    pub description: ::std::option::Option<::std::string::String>,
46    /// <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>
47    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
48    /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
49    /// <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>
50    /// </note>
51    pub segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
52    /// <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>
53    pub previous_contact_id: ::std::option::Option<::std::string::String>,
54}
55impl CreateContactInput {
56    /// <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>
57    pub fn instance_id(&self) -> ::std::option::Option<&str> {
58        self.instance_id.as_deref()
59    }
60    /// <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>
61    pub fn client_token(&self) -> ::std::option::Option<&str> {
62        self.client_token.as_deref()
63    }
64    /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
65    pub fn related_contact_id(&self) -> ::std::option::Option<&str> {
66        self.related_contact_id.as_deref()
67    }
68    /// <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>
69    /// <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>
70    pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71        self.attributes.as_ref()
72    }
73    /// <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: <code>URL</code> | <code>NUMBER</code> | <code>STRING</code> | <code>DATE</code> | <code>EMAIL</code> | <code>ATTACHMENT</code>.</p>
74    pub fn references(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
75        self.references.as_ref()
76    }
77    /// <p>The channel for the contact.</p><important>
78    /// <p>The CHAT channel is not supported. The following information is incorrect. We're working to correct it.</p>
79    /// </important>
80    pub fn channel(&self) -> ::std::option::Option<&crate::types::Channel> {
81        self.channel.as_ref()
82    }
83    /// <p>Indicates how the contact was initiated.</p><important>
84    /// <p>CreateContact only supports the following initiation methods. Valid values by channel are:</p>
85    /// <ul>
86    /// <li>
87    /// <p>For VOICE: <code>TRANSFER</code> and the subtype <code>connect:ExternalAudio</code></p></li>
88    /// <li>
89    /// <p>For EMAIL: <code>OUTBOUND</code> | <code>AGENT_REPLY</code> | <code>FLOW</code></p></li>
90    /// <li>
91    /// <p>For TASK: <code>API</code></p></li>
92    /// </ul>
93    /// <p>The other channels listed below are incorrect. We're working to correct this information.</p>
94    /// </important>
95    pub fn initiation_method(&self) -> ::std::option::Option<&crate::types::ContactInitiationMethod> {
96        self.initiation_method.as_ref()
97    }
98    /// <p>Number of minutes the contact will be active for before expiring</p>
99    pub fn expiry_duration_in_minutes(&self) -> ::std::option::Option<i32> {
100        self.expiry_duration_in_minutes
101    }
102    /// <p>User details for the contact</p><important>
103    /// <p>UserInfo is required when creating an EMAIL contact with <code>OUTBOUND</code> and <code>AGENT_REPLY</code> contact initiation methods.</p>
104    /// </important>
105    pub fn user_info(&self) -> ::std::option::Option<&crate::types::UserInfo> {
106        self.user_info.as_ref()
107    }
108    /// <p>Initial state of the contact when it's created. Only TASK channel contacts can be initiated with <code>COMPLETED</code> state.</p>
109    pub fn initiate_as(&self) -> ::std::option::Option<&crate::types::InitiateAs> {
110        self.initiate_as.as_ref()
111    }
112    /// <p>The name of a the contact.</p>
113    pub fn name(&self) -> ::std::option::Option<&str> {
114        self.name.as_deref()
115    }
116    /// <p>A description of the contact.</p>
117    pub fn description(&self) -> ::std::option::Option<&str> {
118        self.description.as_deref()
119    }
120    /// <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>
121    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
122    /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
123    /// <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>
124    /// </note>
125    pub fn segment_attributes(
126        &self,
127    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
128        self.segment_attributes.as_ref()
129    }
130    /// <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>
131    pub fn previous_contact_id(&self) -> ::std::option::Option<&str> {
132        self.previous_contact_id.as_deref()
133    }
134}
135impl ::std::fmt::Debug for CreateContactInput {
136    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
137        let mut formatter = f.debug_struct("CreateContactInput");
138        formatter.field("instance_id", &self.instance_id);
139        formatter.field("client_token", &self.client_token);
140        formatter.field("related_contact_id", &self.related_contact_id);
141        formatter.field("attributes", &self.attributes);
142        formatter.field("references", &self.references);
143        formatter.field("channel", &self.channel);
144        formatter.field("initiation_method", &self.initiation_method);
145        formatter.field("expiry_duration_in_minutes", &self.expiry_duration_in_minutes);
146        formatter.field("user_info", &self.user_info);
147        formatter.field("initiate_as", &self.initiate_as);
148        formatter.field("name", &"*** Sensitive Data Redacted ***");
149        formatter.field("description", &"*** Sensitive Data Redacted ***");
150        formatter.field("segment_attributes", &self.segment_attributes);
151        formatter.field("previous_contact_id", &self.previous_contact_id);
152        formatter.finish()
153    }
154}
155impl CreateContactInput {
156    /// Creates a new builder-style object to manufacture [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
157    pub fn builder() -> crate::operation::create_contact::builders::CreateContactInputBuilder {
158        crate::operation::create_contact::builders::CreateContactInputBuilder::default()
159    }
160}
161
162/// A builder for [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
163#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
164#[non_exhaustive]
165pub struct CreateContactInputBuilder {
166    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
167    pub(crate) client_token: ::std::option::Option<::std::string::String>,
168    pub(crate) related_contact_id: ::std::option::Option<::std::string::String>,
169    pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
170    pub(crate) references: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
171    pub(crate) channel: ::std::option::Option<crate::types::Channel>,
172    pub(crate) initiation_method: ::std::option::Option<crate::types::ContactInitiationMethod>,
173    pub(crate) expiry_duration_in_minutes: ::std::option::Option<i32>,
174    pub(crate) user_info: ::std::option::Option<crate::types::UserInfo>,
175    pub(crate) initiate_as: ::std::option::Option<crate::types::InitiateAs>,
176    pub(crate) name: ::std::option::Option<::std::string::String>,
177    pub(crate) description: ::std::option::Option<::std::string::String>,
178    pub(crate) segment_attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
179    pub(crate) previous_contact_id: ::std::option::Option<::std::string::String>,
180}
181impl CreateContactInputBuilder {
182    /// <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>
183    /// This field is required.
184    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.instance_id = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <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>
189    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.instance_id = input;
191        self
192    }
193    /// <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>
194    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.instance_id
196    }
197    /// <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>
198    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.client_token = ::std::option::Option::Some(input.into());
200        self
201    }
202    /// <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>
203    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.client_token = input;
205        self
206    }
207    /// <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>
208    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
209        &self.client_token
210    }
211    /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
212    pub fn related_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.related_contact_id = ::std::option::Option::Some(input.into());
214        self
215    }
216    /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
217    pub fn set_related_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.related_contact_id = input;
219        self
220    }
221    /// <p>The identifier of the contact in this instance of Amazon Connect.</p>
222    pub fn get_related_contact_id(&self) -> &::std::option::Option<::std::string::String> {
223        &self.related_contact_id
224    }
225    /// Adds a key-value pair to `attributes`.
226    ///
227    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
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 attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
232        let mut hash_map = self.attributes.unwrap_or_default();
233        hash_map.insert(k.into(), v.into());
234        self.attributes = ::std::option::Option::Some(hash_map);
235        self
236    }
237    /// <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>
238    /// <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>
239    pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
240        self.attributes = input;
241        self
242    }
243    /// <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>
244    /// <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>
245    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
246        &self.attributes
247    }
248    /// Adds a key-value pair to `references`.
249    ///
250    /// To override the contents of this collection use [`set_references`](Self::set_references).
251    ///
252    /// <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: <code>URL</code> | <code>NUMBER</code> | <code>STRING</code> | <code>DATE</code> | <code>EMAIL</code> | <code>ATTACHMENT</code>.</p>
253    pub fn references(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Reference) -> Self {
254        let mut hash_map = self.references.unwrap_or_default();
255        hash_map.insert(k.into(), v);
256        self.references = ::std::option::Option::Some(hash_map);
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: <code>URL</code> | <code>NUMBER</code> | <code>STRING</code> | <code>DATE</code> | <code>EMAIL</code> | <code>ATTACHMENT</code>.</p>
260    pub fn set_references(
261        mut self,
262        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
263    ) -> Self {
264        self.references = input;
265        self
266    }
267    /// <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: <code>URL</code> | <code>NUMBER</code> | <code>STRING</code> | <code>DATE</code> | <code>EMAIL</code> | <code>ATTACHMENT</code>.</p>
268    pub fn get_references(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
269        &self.references
270    }
271    /// <p>The channel for the contact.</p><important>
272    /// <p>The CHAT channel is not supported. The following information is incorrect. We're working to correct it.</p>
273    /// </important>
274    /// This field is required.
275    pub fn channel(mut self, input: crate::types::Channel) -> Self {
276        self.channel = ::std::option::Option::Some(input);
277        self
278    }
279    /// <p>The channel for the contact.</p><important>
280    /// <p>The CHAT channel is not supported. The following information is incorrect. We're working to correct it.</p>
281    /// </important>
282    pub fn set_channel(mut self, input: ::std::option::Option<crate::types::Channel>) -> Self {
283        self.channel = input;
284        self
285    }
286    /// <p>The channel for the contact.</p><important>
287    /// <p>The CHAT channel is not supported. The following information is incorrect. We're working to correct it.</p>
288    /// </important>
289    pub fn get_channel(&self) -> &::std::option::Option<crate::types::Channel> {
290        &self.channel
291    }
292    /// <p>Indicates how the contact was initiated.</p><important>
293    /// <p>CreateContact only supports the following initiation methods. Valid values by channel are:</p>
294    /// <ul>
295    /// <li>
296    /// <p>For VOICE: <code>TRANSFER</code> and the subtype <code>connect:ExternalAudio</code></p></li>
297    /// <li>
298    /// <p>For EMAIL: <code>OUTBOUND</code> | <code>AGENT_REPLY</code> | <code>FLOW</code></p></li>
299    /// <li>
300    /// <p>For TASK: <code>API</code></p></li>
301    /// </ul>
302    /// <p>The other channels listed below are incorrect. We're working to correct this information.</p>
303    /// </important>
304    /// This field is required.
305    pub fn initiation_method(mut self, input: crate::types::ContactInitiationMethod) -> Self {
306        self.initiation_method = ::std::option::Option::Some(input);
307        self
308    }
309    /// <p>Indicates how the contact was initiated.</p><important>
310    /// <p>CreateContact only supports the following initiation methods. Valid values by channel are:</p>
311    /// <ul>
312    /// <li>
313    /// <p>For VOICE: <code>TRANSFER</code> and the subtype <code>connect:ExternalAudio</code></p></li>
314    /// <li>
315    /// <p>For EMAIL: <code>OUTBOUND</code> | <code>AGENT_REPLY</code> | <code>FLOW</code></p></li>
316    /// <li>
317    /// <p>For TASK: <code>API</code></p></li>
318    /// </ul>
319    /// <p>The other channels listed below are incorrect. We're working to correct this information.</p>
320    /// </important>
321    pub fn set_initiation_method(mut self, input: ::std::option::Option<crate::types::ContactInitiationMethod>) -> Self {
322        self.initiation_method = input;
323        self
324    }
325    /// <p>Indicates how the contact was initiated.</p><important>
326    /// <p>CreateContact only supports the following initiation methods. Valid values by channel are:</p>
327    /// <ul>
328    /// <li>
329    /// <p>For VOICE: <code>TRANSFER</code> and the subtype <code>connect:ExternalAudio</code></p></li>
330    /// <li>
331    /// <p>For EMAIL: <code>OUTBOUND</code> | <code>AGENT_REPLY</code> | <code>FLOW</code></p></li>
332    /// <li>
333    /// <p>For TASK: <code>API</code></p></li>
334    /// </ul>
335    /// <p>The other channels listed below are incorrect. We're working to correct this information.</p>
336    /// </important>
337    pub fn get_initiation_method(&self) -> &::std::option::Option<crate::types::ContactInitiationMethod> {
338        &self.initiation_method
339    }
340    /// <p>Number of minutes the contact will be active for before expiring</p>
341    pub fn expiry_duration_in_minutes(mut self, input: i32) -> Self {
342        self.expiry_duration_in_minutes = ::std::option::Option::Some(input);
343        self
344    }
345    /// <p>Number of minutes the contact will be active for before expiring</p>
346    pub fn set_expiry_duration_in_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
347        self.expiry_duration_in_minutes = input;
348        self
349    }
350    /// <p>Number of minutes the contact will be active for before expiring</p>
351    pub fn get_expiry_duration_in_minutes(&self) -> &::std::option::Option<i32> {
352        &self.expiry_duration_in_minutes
353    }
354    /// <p>User details for the contact</p><important>
355    /// <p>UserInfo is required when creating an EMAIL contact with <code>OUTBOUND</code> and <code>AGENT_REPLY</code> contact initiation methods.</p>
356    /// </important>
357    pub fn user_info(mut self, input: crate::types::UserInfo) -> Self {
358        self.user_info = ::std::option::Option::Some(input);
359        self
360    }
361    /// <p>User details for the contact</p><important>
362    /// <p>UserInfo is required when creating an EMAIL contact with <code>OUTBOUND</code> and <code>AGENT_REPLY</code> contact initiation methods.</p>
363    /// </important>
364    pub fn set_user_info(mut self, input: ::std::option::Option<crate::types::UserInfo>) -> Self {
365        self.user_info = input;
366        self
367    }
368    /// <p>User details for the contact</p><important>
369    /// <p>UserInfo is required when creating an EMAIL contact with <code>OUTBOUND</code> and <code>AGENT_REPLY</code> contact initiation methods.</p>
370    /// </important>
371    pub fn get_user_info(&self) -> &::std::option::Option<crate::types::UserInfo> {
372        &self.user_info
373    }
374    /// <p>Initial state of the contact when it's created. Only TASK channel contacts can be initiated with <code>COMPLETED</code> state.</p>
375    pub fn initiate_as(mut self, input: crate::types::InitiateAs) -> Self {
376        self.initiate_as = ::std::option::Option::Some(input);
377        self
378    }
379    /// <p>Initial state of the contact when it's created. Only TASK channel contacts can be initiated with <code>COMPLETED</code> state.</p>
380    pub fn set_initiate_as(mut self, input: ::std::option::Option<crate::types::InitiateAs>) -> Self {
381        self.initiate_as = input;
382        self
383    }
384    /// <p>Initial state of the contact when it's created. Only TASK channel contacts can be initiated with <code>COMPLETED</code> state.</p>
385    pub fn get_initiate_as(&self) -> &::std::option::Option<crate::types::InitiateAs> {
386        &self.initiate_as
387    }
388    /// <p>The name of a the contact.</p>
389    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
390        self.name = ::std::option::Option::Some(input.into());
391        self
392    }
393    /// <p>The name of a the contact.</p>
394    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
395        self.name = input;
396        self
397    }
398    /// <p>The name of a the contact.</p>
399    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
400        &self.name
401    }
402    /// <p>A description of the contact.</p>
403    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404        self.description = ::std::option::Option::Some(input.into());
405        self
406    }
407    /// <p>A description of the contact.</p>
408    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409        self.description = input;
410        self
411    }
412    /// <p>A description of the contact.</p>
413    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
414        &self.description
415    }
416    /// Adds a key-value pair to `segment_attributes`.
417    ///
418    /// To override the contents of this collection use [`set_segment_attributes`](Self::set_segment_attributes).
419    ///
420    /// <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>
421    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
422    /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
423    /// <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>
424    /// </note>
425    pub fn segment_attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SegmentAttributeValue) -> Self {
426        let mut hash_map = self.segment_attributes.unwrap_or_default();
427        hash_map.insert(k.into(), v);
428        self.segment_attributes = ::std::option::Option::Some(hash_map);
429        self
430    }
431    /// <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>
432    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
433    /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
434    /// <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>
435    /// </note>
436    pub fn set_segment_attributes(
437        mut self,
438        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
439    ) -> Self {
440        self.segment_attributes = input;
441        self
442    }
443    /// <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>
444    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
445    /// <p>This field can be used to set Segment Contact Expiry as a duration in minutes.</p><note>
446    /// <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>
447    /// </note>
448    pub fn get_segment_attributes(
449        &self,
450    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
451        &self.segment_attributes
452    }
453    /// <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>
454    pub fn previous_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
455        self.previous_contact_id = ::std::option::Option::Some(input.into());
456        self
457    }
458    /// <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>
459    pub fn set_previous_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
460        self.previous_contact_id = input;
461        self
462    }
463    /// <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>
464    pub fn get_previous_contact_id(&self) -> &::std::option::Option<::std::string::String> {
465        &self.previous_contact_id
466    }
467    /// Consumes the builder and constructs a [`CreateContactInput`](crate::operation::create_contact::CreateContactInput).
468    pub fn build(
469        self,
470    ) -> ::std::result::Result<crate::operation::create_contact::CreateContactInput, ::aws_smithy_types::error::operation::BuildError> {
471        ::std::result::Result::Ok(crate::operation::create_contact::CreateContactInput {
472            instance_id: self.instance_id,
473            client_token: self.client_token,
474            related_contact_id: self.related_contact_id,
475            attributes: self.attributes,
476            references: self.references,
477            channel: self.channel,
478            initiation_method: self.initiation_method,
479            expiry_duration_in_minutes: self.expiry_duration_in_minutes,
480            user_info: self.user_info,
481            initiate_as: self.initiate_as,
482            name: self.name,
483            description: self.description,
484            segment_attributes: self.segment_attributes,
485            previous_contact_id: self.previous_contact_id,
486        })
487    }
488}
489impl ::std::fmt::Debug for CreateContactInputBuilder {
490    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
491        let mut formatter = f.debug_struct("CreateContactInputBuilder");
492        formatter.field("instance_id", &self.instance_id);
493        formatter.field("client_token", &self.client_token);
494        formatter.field("related_contact_id", &self.related_contact_id);
495        formatter.field("attributes", &self.attributes);
496        formatter.field("references", &self.references);
497        formatter.field("channel", &self.channel);
498        formatter.field("initiation_method", &self.initiation_method);
499        formatter.field("expiry_duration_in_minutes", &self.expiry_duration_in_minutes);
500        formatter.field("user_info", &self.user_info);
501        formatter.field("initiate_as", &self.initiate_as);
502        formatter.field("name", &"*** Sensitive Data Redacted ***");
503        formatter.field("description", &"*** Sensitive Data Redacted ***");
504        formatter.field("segment_attributes", &self.segment_attributes);
505        formatter.field("previous_contact_id", &self.previous_contact_id);
506        formatter.finish()
507    }
508}