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