aws_sdk_connect/operation/update_contact/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_contact::_update_contact_output::UpdateContactOutputBuilder;
3
4pub use crate::operation::update_contact::_update_contact_input::UpdateContactInputBuilder;
5
6impl crate::operation::update_contact::builders::UpdateContactInputBuilder {
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::update_contact::UpdateContactOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_contact::UpdateContactError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_contact();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateContact`.
24///
25/// <p>This API is in preview release for Amazon Connect and is subject to change.</p>
26/// <p>Adds or updates user-defined contact information associated with the specified contact. At least one field to be updated must be present in the request.</p><important>
27/// <p>You can add or update user-defined contact information for both ongoing and completed contacts.</p>
28/// </important>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct UpdateContactFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::update_contact::builders::UpdateContactInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::update_contact::UpdateContactOutput,
38 crate::operation::update_contact::UpdateContactError,
39 > for UpdateContactFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::update_contact::UpdateContactOutput,
47 crate::operation::update_contact::UpdateContactError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl UpdateContactFluentBuilder {
54 /// Creates a new `UpdateContactFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the UpdateContact as a reference.
63 pub fn as_input(&self) -> &crate::operation::update_contact::builders::UpdateContactInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::update_contact::UpdateContactOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::update_contact::UpdateContactError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::update_contact::UpdateContact::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::update_contact::UpdateContact::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::update_contact::UpdateContactOutput,
100 crate::operation::update_contact::UpdateContactError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// <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>
115 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.instance_id(input.into());
117 self
118 }
119 /// <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>
120 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_instance_id(input);
122 self
123 }
124 /// <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>
125 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_instance_id()
127 }
128 /// <p>The identifier of the contact. This is the identifier of the contact associated with the first interaction with your contact center.</p>
129 pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.inner = self.inner.contact_id(input.into());
131 self
132 }
133 /// <p>The identifier of the contact. This is the identifier of the contact associated with the first interaction with your contact center.</p>
134 pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_contact_id(input);
136 self
137 }
138 /// <p>The identifier of the contact. This is the identifier of the contact associated with the first interaction with your contact center.</p>
139 pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
140 self.inner.get_contact_id()
141 }
142 /// <p>The name of the contact.</p>
143 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.inner = self.inner.name(input.into());
145 self
146 }
147 /// <p>The name of the contact.</p>
148 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.inner = self.inner.set_name(input);
150 self
151 }
152 /// <p>The name of the contact.</p>
153 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
154 self.inner.get_name()
155 }
156 /// <p>The description of the contact.</p>
157 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.description(input.into());
159 self
160 }
161 /// <p>The description of the contact.</p>
162 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_description(input);
164 self
165 }
166 /// <p>The description of the contact.</p>
167 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_description()
169 }
170 ///
171 /// Adds a key-value pair to `References`.
172 ///
173 /// To override the contents of this collection use [`set_references`](Self::set_references).
174 ///
175 /// <p>Well-formed data on contact, shown to agents on Contact Control Panel (CCP).</p>
176 pub fn references(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Reference) -> Self {
177 self.inner = self.inner.references(k.into(), v);
178 self
179 }
180 /// <p>Well-formed data on contact, shown to agents on Contact Control Panel (CCP).</p>
181 pub fn set_references(
182 mut self,
183 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>>,
184 ) -> Self {
185 self.inner = self.inner.set_references(input);
186 self
187 }
188 /// <p>Well-formed data on contact, shown to agents on Contact Control Panel (CCP).</p>
189 pub fn get_references(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Reference>> {
190 self.inner.get_references()
191 }
192 ///
193 /// Adds a key-value pair to `SegmentAttributes`.
194 ///
195 /// To override the contents of this collection use [`set_segment_attributes`](Self::set_segment_attributes).
196 ///
197 /// <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>
198 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
199 /// <p>This field can be used to show channel subtype, such as <code>connect:Guide</code>.</p>
200 /// <p>Contact Expiry, and user-defined attributes (String - String) that are defined in predefined attributes, can be updated by using the UpdateContact API.</p>
201 pub fn segment_attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SegmentAttributeValue) -> Self {
202 self.inner = self.inner.segment_attributes(k.into(), v);
203 self
204 }
205 /// <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>
206 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
207 /// <p>This field can be used to show channel subtype, such as <code>connect:Guide</code>.</p>
208 /// <p>Contact Expiry, and user-defined attributes (String - String) that are defined in predefined attributes, can be updated by using the UpdateContact API.</p>
209 pub fn set_segment_attributes(
210 mut self,
211 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>>,
212 ) -> Self {
213 self.inner = self.inner.set_segment_attributes(input);
214 self
215 }
216 /// <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>
217 /// <p>Attribute keys can include only alphanumeric, -, and _.</p>
218 /// <p>This field can be used to show channel subtype, such as <code>connect:Guide</code>.</p>
219 /// <p>Contact Expiry, and user-defined attributes (String - String) that are defined in predefined attributes, can be updated by using the UpdateContact API.</p>
220 pub fn get_segment_attributes(
221 &self,
222 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SegmentAttributeValue>> {
223 self.inner.get_segment_attributes()
224 }
225 /// <p>Information about the queue associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
226 pub fn queue_info(mut self, input: crate::types::QueueInfoInput) -> Self {
227 self.inner = self.inner.queue_info(input);
228 self
229 }
230 /// <p>Information about the queue associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
231 pub fn set_queue_info(mut self, input: ::std::option::Option<crate::types::QueueInfoInput>) -> Self {
232 self.inner = self.inner.set_queue_info(input);
233 self
234 }
235 /// <p>Information about the queue associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
236 pub fn get_queue_info(&self) -> &::std::option::Option<crate::types::QueueInfoInput> {
237 self.inner.get_queue_info()
238 }
239 /// <p>Information about the agent associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
240 pub fn user_info(mut self, input: crate::types::UserInfo) -> Self {
241 self.inner = self.inner.user_info(input);
242 self
243 }
244 /// <p>Information about the agent associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
245 pub fn set_user_info(mut self, input: ::std::option::Option<crate::types::UserInfo>) -> Self {
246 self.inner = self.inner.set_user_info(input);
247 self
248 }
249 /// <p>Information about the agent associated with a contact. This parameter can only be updated for external audio contacts. It is used when you integrate third-party systems with Contact Lens for analytics. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i> Amazon Connect Administrator Guide</i>.</p>
250 pub fn get_user_info(&self) -> &::std::option::Option<crate::types::UserInfo> {
251 self.inner.get_user_info()
252 }
253 /// <p>The endpoint of the customer for which the contact was initiated. For external audio contacts, this is usually the end customer's phone number. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
254 pub fn customer_endpoint(mut self, input: crate::types::Endpoint) -> Self {
255 self.inner = self.inner.customer_endpoint(input);
256 self
257 }
258 /// <p>The endpoint of the customer for which the contact was initiated. For external audio contacts, this is usually the end customer's phone number. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
259 pub fn set_customer_endpoint(mut self, input: ::std::option::Option<crate::types::Endpoint>) -> Self {
260 self.inner = self.inner.set_customer_endpoint(input);
261 self
262 }
263 /// <p>The endpoint of the customer for which the contact was initiated. For external audio contacts, this is usually the end customer's phone number. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
264 pub fn get_customer_endpoint(&self) -> &::std::option::Option<crate::types::Endpoint> {
265 self.inner.get_customer_endpoint()
266 }
267 /// <p>External system endpoint for the contact was initiated. For external audio contacts, this is the phone number of the external system such as the contact center. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
268 pub fn system_endpoint(mut self, input: crate::types::Endpoint) -> Self {
269 self.inner = self.inner.system_endpoint(input);
270 self
271 }
272 /// <p>External system endpoint for the contact was initiated. For external audio contacts, this is the phone number of the external system such as the contact center. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
273 pub fn set_system_endpoint(mut self, input: ::std::option::Option<crate::types::Endpoint>) -> Self {
274 self.inner = self.inner.set_system_endpoint(input);
275 self
276 }
277 /// <p>External system endpoint for the contact was initiated. For external audio contacts, this is the phone number of the external system such as the contact center. This value can only be updated for external audio contacts. For more information, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-integration.html">Amazon Connect Contact Lens integration</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
278 pub fn get_system_endpoint(&self) -> &::std::option::Option<crate::types::Endpoint> {
279 self.inner.get_system_endpoint()
280 }
281}