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