aws_sdk_connect/operation/start_task_contact/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_task_contact::_start_task_contact_output::StartTaskContactOutputBuilder;
3
4pub use crate::operation::start_task_contact::_start_task_contact_input::StartTaskContactInputBuilder;
5
6impl crate::operation::start_task_contact::builders::StartTaskContactInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::start_task_contact::StartTaskContactOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_task_contact::StartTaskContactError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_task_contact();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartTaskContact`.
24///
25/// <p>Initiates a flow to start a new task contact. For more information about task contacts, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tasks.html">Concepts: Tasks in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
26/// <p>When using <code>PreviousContactId</code> and <code>RelatedContactId</code> input parameters, note the following:</p>
27/// <ul>
28/// <li>
29/// <p><code>PreviousContactId</code></p>
30/// <ul>
31/// <li>
32/// <p>Any updates to user-defined task contact attributes on any contact linked through the same <code>PreviousContactId</code> will affect every contact in the chain.</p></li>
33/// <li>
34/// <p>There can be a maximum of 12 linked task contacts in a chain. That is, 12 task contacts can be created that share the same <code>PreviousContactId</code>.</p></li>
35/// </ul></li>
36/// <li>
37/// <p><code>RelatedContactId</code></p>
38/// <ul>
39/// <li>
40/// <p>Copies contact attributes from the related task contact to the new contact.</p></li>
41/// <li>
42/// <p>Any update on attributes in a new task contact does not update attributes on previous contact.</p></li>
43/// <li>
44/// <p>There’s no limit on the number of task contacts that can be created that use the same <code>RelatedContactId</code>.</p></li>
45/// </ul></li>
46/// </ul>
47/// <p>In addition, when calling StartTaskContact include only one of these parameters: <code>ContactFlowID</code>, <code>QuickConnectID</code>, or <code>TaskTemplateID</code>. Only one parameter is required as long as the task template has a flow configured to run it. If more than one parameter is specified, or only the <code>TaskTemplateID</code> is specified but it does not have a flow configured, the request returns an error because Amazon Connect cannot identify the unique flow to run when the task is created.</p>
48/// <p>A <code>ServiceQuotaExceededException</code> occurs when the number of open tasks exceeds the active tasks quota or there are already 12 tasks referencing the same <code>PreviousContactId</code>. For more information about service quotas for task contacts, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
49#[derive(::std::clone::Clone, ::std::fmt::Debug)]
50pub struct StartTaskContactFluentBuilder {
51    handle: ::std::sync::Arc<crate::client::Handle>,
52    inner: crate::operation::start_task_contact::builders::StartTaskContactInputBuilder,
53    config_override: ::std::option::Option<crate::config::Builder>,
54}
55impl
56    crate::client::customize::internal::CustomizableSend<
57        crate::operation::start_task_contact::StartTaskContactOutput,
58        crate::operation::start_task_contact::StartTaskContactError,
59    > for StartTaskContactFluentBuilder
60{
61    fn send(
62        self,
63        config_override: crate::config::Builder,
64    ) -> crate::client::customize::internal::BoxFuture<
65        crate::client::customize::internal::SendResult<
66            crate::operation::start_task_contact::StartTaskContactOutput,
67            crate::operation::start_task_contact::StartTaskContactError,
68        >,
69    > {
70        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
71    }
72}
73impl StartTaskContactFluentBuilder {
74    /// Creates a new `StartTaskContactFluentBuilder`.
75    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
76        Self {
77            handle,
78            inner: ::std::default::Default::default(),
79            config_override: ::std::option::Option::None,
80        }
81    }
82    /// Access the StartTaskContact as a reference.
83    pub fn as_input(&self) -> &crate::operation::start_task_contact::builders::StartTaskContactInputBuilder {
84        &self.inner
85    }
86    /// Sends the request and returns the response.
87    ///
88    /// If an error occurs, an `SdkError` will be returned with additional details that
89    /// can be matched against.
90    ///
91    /// By default, any retryable failures will be retried twice. Retry behavior
92    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
93    /// set when configuring the client.
94    pub async fn send(
95        self,
96    ) -> ::std::result::Result<
97        crate::operation::start_task_contact::StartTaskContactOutput,
98        ::aws_smithy_runtime_api::client::result::SdkError<
99            crate::operation::start_task_contact::StartTaskContactError,
100            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
101        >,
102    > {
103        let input = self
104            .inner
105            .build()
106            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
107        let runtime_plugins = crate::operation::start_task_contact::StartTaskContact::operation_runtime_plugins(
108            self.handle.runtime_plugins.clone(),
109            &self.handle.conf,
110            self.config_override,
111        );
112        crate::operation::start_task_contact::StartTaskContact::orchestrate(&runtime_plugins, input).await
113    }
114
115    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
116    pub fn customize(
117        self,
118    ) -> crate::client::customize::CustomizableOperation<
119        crate::operation::start_task_contact::StartTaskContactOutput,
120        crate::operation::start_task_contact::StartTaskContactError,
121        Self,
122    > {
123        crate::client::customize::CustomizableOperation::new(self)
124    }
125    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
126        self.set_config_override(::std::option::Option::Some(config_override.into()));
127        self
128    }
129
130    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
131        self.config_override = config_override;
132        self
133    }
134    /// <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>
135    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.instance_id(input.into());
137        self
138    }
139    /// <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>
140    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_instance_id(input);
142        self
143    }
144    /// <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>
145    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_instance_id()
147    }
148    /// <p>The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to task contacts linked using the same <code>PreviousContactID</code> will affect every contact in the chain. There can be a maximum of 12 linked task contacts in a chain.</p>
149    pub fn previous_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.inner = self.inner.previous_contact_id(input.into());
151        self
152    }
153    /// <p>The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to task contacts linked using the same <code>PreviousContactID</code> will affect every contact in the chain. There can be a maximum of 12 linked task contacts in a chain.</p>
154    pub fn set_previous_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.inner = self.inner.set_previous_contact_id(input);
156        self
157    }
158    /// <p>The identifier of the previous chat, voice, or task contact. Any updates to user-defined attributes to task contacts linked using the same <code>PreviousContactID</code> will affect every contact in the chain. There can be a maximum of 12 linked task contacts in a chain.</p>
159    pub fn get_previous_contact_id(&self) -> &::std::option::Option<::std::string::String> {
160        self.inner.get_previous_contact_id()
161    }
162    /// <p>The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to <b>Routing</b>, <b>Flows</b>. Choose the flow. On the flow page, under the name of the flow, choose <b>Show additional flow information</b>. The ContactFlowId is the last part of the ARN, shown here in bold:</p>
163    /// <p>arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/<b>846ec553-a005-41c0-8341-xxxxxxxxxxxx</b></p>
164    pub fn contact_flow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.inner = self.inner.contact_flow_id(input.into());
166        self
167    }
168    /// <p>The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to <b>Routing</b>, <b>Flows</b>. Choose the flow. On the flow page, under the name of the flow, choose <b>Show additional flow information</b>. The ContactFlowId is the last part of the ARN, shown here in bold:</p>
169    /// <p>arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/<b>846ec553-a005-41c0-8341-xxxxxxxxxxxx</b></p>
170    pub fn set_contact_flow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.inner = self.inner.set_contact_flow_id(input);
172        self
173    }
174    /// <p>The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect admin website, on the navigation menu go to <b>Routing</b>, <b>Flows</b>. Choose the flow. On the flow page, under the name of the flow, choose <b>Show additional flow information</b>. The ContactFlowId is the last part of the ARN, shown here in bold:</p>
175    /// <p>arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/<b>846ec553-a005-41c0-8341-xxxxxxxxxxxx</b></p>
176    pub fn get_contact_flow_id(&self) -> &::std::option::Option<::std::string::String> {
177        self.inner.get_contact_flow_id()
178    }
179    ///
180    /// Adds a key-value pair to `Attributes`.
181    ///
182    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
183    ///
184    /// <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>
185    /// <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>
186    pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.inner = self.inner.attributes(k.into(), v.into());
188        self
189    }
190    /// <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>
191    /// <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>
192    pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
193        self.inner = self.inner.set_attributes(input);
194        self
195    }
196    /// <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>
197    /// <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>
198    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
199        self.inner.get_attributes()
200    }
201    /// <p>The name of a task that is shown to an agent in the Contact Control Panel (CCP).</p>
202    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.inner = self.inner.name(input.into());
204        self
205    }
206    /// <p>The name of a task that is shown to an agent in the Contact Control Panel (CCP).</p>
207    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.inner = self.inner.set_name(input);
209        self
210    }
211    /// <p>The name of a task that is shown to an agent in the Contact Control Panel (CCP).</p>
212    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
213        self.inner.get_name()
214    }
215    ///
216    /// Adds a key-value pair to `References`.
217    ///
218    /// To override the contents of this collection use [`set_references`](Self::set_references).
219    ///
220    /// <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> is not a supported reference type during task creation.</p>
221    pub fn references(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Reference) -> Self {
222        self.inner = self.inner.references(k.into(), v);
223        self
224    }
225    /// <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> is not a supported reference type during task creation.</p>
226    pub fn set_references(
227        mut self,
228        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
229    ) -> Self {
230        self.inner = self.inner.set_references(input);
231        self
232    }
233    /// <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> is not a supported reference type during task creation.</p>
234    pub fn get_references(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
235        self.inner.get_references()
236    }
237    /// <p>A description of the task that is shown to an agent in the Contact Control Panel (CCP).</p>
238    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        self.inner = self.inner.description(input.into());
240        self
241    }
242    /// <p>A description of the task that is shown to an agent in the Contact Control Panel (CCP).</p>
243    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.inner = self.inner.set_description(input);
245        self
246    }
247    /// <p>A description of the task that is shown to an agent in the Contact Control Panel (CCP).</p>
248    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
249        self.inner.get_description()
250    }
251    /// <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>
252    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.inner = self.inner.client_token(input.into());
254        self
255    }
256    /// <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>
257    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.inner = self.inner.set_client_token(input);
259        self
260    }
261    /// <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>
262    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
263        self.inner.get_client_token()
264    }
265    /// <p>The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.</p>
266    pub fn scheduled_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
267        self.inner = self.inner.scheduled_time(input);
268        self
269    }
270    /// <p>The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.</p>
271    pub fn set_scheduled_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
272        self.inner = self.inner.set_scheduled_time(input);
273        self
274    }
275    /// <p>The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.</p>
276    pub fn get_scheduled_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
277        self.inner.get_scheduled_time()
278    }
279    /// <p>A unique identifier for the task template. For more information about task templates, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/task-templates.html">Create task templates</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
280    pub fn task_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.inner = self.inner.task_template_id(input.into());
282        self
283    }
284    /// <p>A unique identifier for the task template. For more information about task templates, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/task-templates.html">Create task templates</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
285    pub fn set_task_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286        self.inner = self.inner.set_task_template_id(input);
287        self
288    }
289    /// <p>A unique identifier for the task template. For more information about task templates, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/task-templates.html">Create task templates</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
290    pub fn get_task_template_id(&self) -> &::std::option::Option<::std::string::String> {
291        self.inner.get_task_template_id()
292    }
293    /// <p>The identifier for the quick connect. Tasks that are created by using <code>QuickConnectId</code> will use the flow that is defined on agent or queue quick connect. For more information about quick connects, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/quick-connects.html">Create quick connects</a>.</p>
294    pub fn quick_connect_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
295        self.inner = self.inner.quick_connect_id(input.into());
296        self
297    }
298    /// <p>The identifier for the quick connect. Tasks that are created by using <code>QuickConnectId</code> will use the flow that is defined on agent or queue quick connect. For more information about quick connects, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/quick-connects.html">Create quick connects</a>.</p>
299    pub fn set_quick_connect_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300        self.inner = self.inner.set_quick_connect_id(input);
301        self
302    }
303    /// <p>The identifier for the quick connect. Tasks that are created by using <code>QuickConnectId</code> will use the flow that is defined on agent or queue quick connect. For more information about quick connects, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/quick-connects.html">Create quick connects</a>.</p>
304    pub fn get_quick_connect_id(&self) -> &::std::option::Option<::std::string::String> {
305        self.inner.get_quick_connect_id()
306    }
307    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tasks.html#linked-tasks">related</a> to this contact. Linking tasks together by using <code>RelatedContactID</code> copies over contact attributes from the related task contact to the new task contact. All updates to user-defined attributes in the new task contact are limited to the individual contact ID, unlike what happens when tasks are linked by using <code>PreviousContactID</code>. There are no limits to the number of contacts that can be linked by using <code>RelatedContactId</code>.</p>
308    pub fn related_contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
309        self.inner = self.inner.related_contact_id(input.into());
310        self
311    }
312    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tasks.html#linked-tasks">related</a> to this contact. Linking tasks together by using <code>RelatedContactID</code> copies over contact attributes from the related task contact to the new task contact. All updates to user-defined attributes in the new task contact are limited to the individual contact ID, unlike what happens when tasks are linked by using <code>PreviousContactID</code>. There are no limits to the number of contacts that can be linked by using <code>RelatedContactId</code>.</p>
313    pub fn set_related_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
314        self.inner = self.inner.set_related_contact_id(input);
315        self
316    }
317    /// <p>The contactId that is <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tasks.html#linked-tasks">related</a> to this contact. Linking tasks together by using <code>RelatedContactID</code> copies over contact attributes from the related task contact to the new task contact. All updates to user-defined attributes in the new task contact are limited to the individual contact ID, unlike what happens when tasks are linked by using <code>PreviousContactID</code>. There are no limits to the number of contacts that can be linked by using <code>RelatedContactId</code>.</p>
318    pub fn get_related_contact_id(&self) -> &::std::option::Option<::std::string::String> {
319        self.inner.get_related_contact_id()
320    }
321    ///
322    /// Adds a key-value pair to `SegmentAttributes`.
323    ///
324    /// To override the contents of this collection use [`set_segment_attributes`](Self::set_segment_attributes).
325    ///
326    /// <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>
327    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
328    /// <p>This field can be used to set Contact Expiry as a duration in minutes and set a UserId for the User who created a task.</p><note>
329    /// <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>
330    /// <p>To set the created by user, a valid AgentResourceId must be supplied, with <code>SegmentAttributes</code> like { <code>"connect:CreatedByUser" { "ValueString": "arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/agent/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}}</code>.</p>
331    /// </note>
332    pub fn segment_attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SegmentAttributeValue) -> Self {
333        self.inner = self.inner.segment_attributes(k.into(), v);
334        self
335    }
336    /// <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>
337    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
338    /// <p>This field can be used to set Contact Expiry as a duration in minutes and set a UserId for the User who created a task.</p><note>
339    /// <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>
340    /// <p>To set the created by user, a valid AgentResourceId must be supplied, with <code>SegmentAttributes</code> like { <code>"connect:CreatedByUser" { "ValueString": "arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/agent/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}}</code>.</p>
341    /// </note>
342    pub fn set_segment_attributes(
343        mut self,
344        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
345    ) -> Self {
346        self.inner = self.inner.set_segment_attributes(input);
347        self
348    }
349    /// <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>
350    /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
351    /// <p>This field can be used to set Contact Expiry as a duration in minutes and set a UserId for the User who created a task.</p><note>
352    /// <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>
353    /// <p>To set the created by user, a valid AgentResourceId must be supplied, with <code>SegmentAttributes</code> like { <code>"connect:CreatedByUser" { "ValueString": "arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/agent/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}}</code>.</p>
354    /// </note>
355    pub fn get_segment_attributes(
356        &self,
357    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
358        self.inner.get_segment_attributes()
359    }
360}