aws_sdk_connect/operation/describe_contact/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_contact::_describe_contact_output::DescribeContactOutputBuilder;
3
4pub use crate::operation::describe_contact::_describe_contact_input::DescribeContactInputBuilder;
5
6impl crate::operation::describe_contact::builders::DescribeContactInputBuilder {
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::describe_contact::DescribeContactOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_contact::DescribeContactError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_contact();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeContact`.
24///
25/// <p>This API is in preview release for Amazon Connect and is subject to change.</p>
26/// <p>Describes the specified contact.</p>
27/// <p><b>Use cases</b></p>
28/// <p>Following are common uses cases for this API:</p>
29/// <ul>
30/// <li>
31/// <p>Retrieve contact information such as the caller's phone number and the specific number the caller dialed to integrate into custom monitoring or custom agent experience solutions.</p></li>
32/// <li>
33/// <p>Detect when a customer chat session disconnects due to a network issue on the agent's end. Use the DisconnectReason field in the <a href="https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html#ctr-ContactTraceRecord">ContactTraceRecord</a> to detect this event and then re-queue the chat for followup.</p></li>
34/// <li>
35/// <p>Identify after contact work (ACW) duration and call recordings information when a COMPLETED event is received by using the <a href="https://docs.aws.amazon.com/connect/latest/adminguide/contact-events.html">contact event stream</a>.</p></li>
36/// </ul>
37/// <p><b>Important things to know</b></p>
38/// <ul>
39/// <li>
40/// <p><code>SystemEndpoint</code> is not populated for contacts with initiation method of MONITOR, QUEUE_TRANSFER, or CALLBACK</p></li>
41/// <li>
42/// <p>Contact information remains available in Amazon Connect for 24 months from the <code>InitiationTimestamp</code>, and then it is deleted. Only contact information that is available in Amazon Connect is returned by this API.</p></li>
43/// </ul>
44/// <p><b>Endpoints</b>: See <a href="https://docs.aws.amazon.com/general/latest/gr/connect_region.html">Amazon Connect endpoints and quotas</a>.</p>
45#[derive(::std::clone::Clone, ::std::fmt::Debug)]
46pub struct DescribeContactFluentBuilder {
47    handle: ::std::sync::Arc<crate::client::Handle>,
48    inner: crate::operation::describe_contact::builders::DescribeContactInputBuilder,
49    config_override: ::std::option::Option<crate::config::Builder>,
50}
51impl
52    crate::client::customize::internal::CustomizableSend<
53        crate::operation::describe_contact::DescribeContactOutput,
54        crate::operation::describe_contact::DescribeContactError,
55    > for DescribeContactFluentBuilder
56{
57    fn send(
58        self,
59        config_override: crate::config::Builder,
60    ) -> crate::client::customize::internal::BoxFuture<
61        crate::client::customize::internal::SendResult<
62            crate::operation::describe_contact::DescribeContactOutput,
63            crate::operation::describe_contact::DescribeContactError,
64        >,
65    > {
66        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
67    }
68}
69impl DescribeContactFluentBuilder {
70    /// Creates a new `DescribeContactFluentBuilder`.
71    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
72        Self {
73            handle,
74            inner: ::std::default::Default::default(),
75            config_override: ::std::option::Option::None,
76        }
77    }
78    /// Access the DescribeContact as a reference.
79    pub fn as_input(&self) -> &crate::operation::describe_contact::builders::DescribeContactInputBuilder {
80        &self.inner
81    }
82    /// Sends the request and returns the response.
83    ///
84    /// If an error occurs, an `SdkError` will be returned with additional details that
85    /// can be matched against.
86    ///
87    /// By default, any retryable failures will be retried twice. Retry behavior
88    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
89    /// set when configuring the client.
90    pub async fn send(
91        self,
92    ) -> ::std::result::Result<
93        crate::operation::describe_contact::DescribeContactOutput,
94        ::aws_smithy_runtime_api::client::result::SdkError<
95            crate::operation::describe_contact::DescribeContactError,
96            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
97        >,
98    > {
99        let input = self
100            .inner
101            .build()
102            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
103        let runtime_plugins = crate::operation::describe_contact::DescribeContact::operation_runtime_plugins(
104            self.handle.runtime_plugins.clone(),
105            &self.handle.conf,
106            self.config_override,
107        );
108        crate::operation::describe_contact::DescribeContact::orchestrate(&runtime_plugins, input).await
109    }
110
111    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
112    pub fn customize(
113        self,
114    ) -> crate::client::customize::CustomizableOperation<
115        crate::operation::describe_contact::DescribeContactOutput,
116        crate::operation::describe_contact::DescribeContactError,
117        Self,
118    > {
119        crate::client::customize::CustomizableOperation::new(self)
120    }
121    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
122        self.set_config_override(::std::option::Option::Some(config_override.into()));
123        self
124    }
125
126    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
127        self.config_override = config_override;
128        self
129    }
130    /// <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>
131    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.instance_id(input.into());
133        self
134    }
135    /// <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>
136    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_instance_id(input);
138        self
139    }
140    /// <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>
141    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_instance_id()
143    }
144    /// <p>The identifier of the contact.</p>
145    pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.contact_id(input.into());
147        self
148    }
149    /// <p>The identifier of the contact.</p>
150    pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_contact_id(input);
152        self
153    }
154    /// <p>The identifier of the contact.</p>
155    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_contact_id()
157    }
158}