aws_sdk_connectparticipant/operation/get_transcript/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_transcript::_get_transcript_output::GetTranscriptOutputBuilder;
3
4pub use crate::operation::get_transcript::_get_transcript_input::GetTranscriptInputBuilder;
5
6impl crate::operation::get_transcript::builders::GetTranscriptInputBuilder {
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::get_transcript::GetTranscriptOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_transcript::GetTranscriptError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_transcript();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetTranscript`.
24///
25/// <p>Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a>.</p>
26/// <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Amazon Connect Chat security best practices</a>.</p>
27/// <p>If you have a process that consumes events in the transcript of an chat that has ended, note that chat transcripts contain the following event content types if the event has occurred during the chat session:</p>
28/// <ul>
29/// <li>
30/// <p><code>application/vnd.amazonaws.connect.event.participant.invited</code></p></li>
31/// <li>
32/// <p><code>application/vnd.amazonaws.connect.event.participant.joined</code></p></li>
33/// <li>
34/// <p><code>application/vnd.amazonaws.connect.event.participant.left</code></p></li>
35/// <li>
36/// <p><code>application/vnd.amazonaws.connect.event.chat.ended</code></p></li>
37/// <li>
38/// <p><code>application/vnd.amazonaws.connect.event.transfer.succeeded</code></p></li>
39/// <li>
40/// <p><code>application/vnd.amazonaws.connect.event.transfer.failed</code></p></li>
41/// </ul><note>
42/// <p><code>ConnectionToken</code> is used for invoking this API instead of <code>ParticipantToken</code>.</p>
43/// </note>
44/// <p>The Amazon Connect Participant Service APIs do not use <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 authentication</a>.</p>
45#[derive(::std::clone::Clone, ::std::fmt::Debug)]
46pub struct GetTranscriptFluentBuilder {
47    handle: ::std::sync::Arc<crate::client::Handle>,
48    inner: crate::operation::get_transcript::builders::GetTranscriptInputBuilder,
49    config_override: ::std::option::Option<crate::config::Builder>,
50}
51impl
52    crate::client::customize::internal::CustomizableSend<
53        crate::operation::get_transcript::GetTranscriptOutput,
54        crate::operation::get_transcript::GetTranscriptError,
55    > for GetTranscriptFluentBuilder
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::get_transcript::GetTranscriptOutput,
63            crate::operation::get_transcript::GetTranscriptError,
64        >,
65    > {
66        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
67    }
68}
69impl GetTranscriptFluentBuilder {
70    /// Creates a new `GetTranscriptFluentBuilder`.
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 GetTranscript as a reference.
79    pub fn as_input(&self) -> &crate::operation::get_transcript::builders::GetTranscriptInputBuilder {
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::get_transcript::GetTranscriptOutput,
94        ::aws_smithy_runtime_api::client::result::SdkError<
95            crate::operation::get_transcript::GetTranscriptError,
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::get_transcript::GetTranscript::operation_runtime_plugins(
104            self.handle.runtime_plugins.clone(),
105            &self.handle.conf,
106            self.config_override,
107        );
108        crate::operation::get_transcript::GetTranscript::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::get_transcript::GetTranscriptOutput,
116        crate::operation::get_transcript::GetTranscriptError,
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    /// Create a paginator for this request
131    ///
132    /// Paginators are used by calling [`send().await`](crate::operation::get_transcript::paginator::GetTranscriptPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
133    pub fn into_paginator(self) -> crate::operation::get_transcript::paginator::GetTranscriptPaginator {
134        crate::operation::get_transcript::paginator::GetTranscriptPaginator::new(self.handle, self.inner)
135    }
136    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
137    pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.contact_id(input.into());
139        self
140    }
141    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
142    pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_contact_id(input);
144        self
145    }
146    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
147    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_contact_id()
149    }
150    /// <p>The maximum number of results to return in the page. Default: 10.</p>
151    pub fn max_results(mut self, input: i32) -> Self {
152        self.inner = self.inner.max_results(input);
153        self
154    }
155    /// <p>The maximum number of results to return in the page. Default: 10.</p>
156    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
157        self.inner = self.inner.set_max_results(input);
158        self
159    }
160    /// <p>The maximum number of results to return in the page. Default: 10.</p>
161    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
162        self.inner.get_max_results()
163    }
164    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
165    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.inner = self.inner.next_token(input.into());
167        self
168    }
169    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
170    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.inner = self.inner.set_next_token(input);
172        self
173    }
174    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
175    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
176        self.inner.get_next_token()
177    }
178    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
179    pub fn scan_direction(mut self, input: crate::types::ScanDirection) -> Self {
180        self.inner = self.inner.scan_direction(input);
181        self
182    }
183    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
184    pub fn set_scan_direction(mut self, input: ::std::option::Option<crate::types::ScanDirection>) -> Self {
185        self.inner = self.inner.set_scan_direction(input);
186        self
187    }
188    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
189    pub fn get_scan_direction(&self) -> &::std::option::Option<crate::types::ScanDirection> {
190        self.inner.get_scan_direction()
191    }
192    /// <p>The sort order for the records. Default: DESCENDING.</p>
193    pub fn sort_order(mut self, input: crate::types::SortKey) -> Self {
194        self.inner = self.inner.sort_order(input);
195        self
196    }
197    /// <p>The sort order for the records. Default: DESCENDING.</p>
198    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortKey>) -> Self {
199        self.inner = self.inner.set_sort_order(input);
200        self
201    }
202    /// <p>The sort order for the records. Default: DESCENDING.</p>
203    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortKey> {
204        self.inner.get_sort_order()
205    }
206    /// <p>A filtering option for where to start.</p>
207    pub fn start_position(mut self, input: crate::types::StartPosition) -> Self {
208        self.inner = self.inner.start_position(input);
209        self
210    }
211    /// <p>A filtering option for where to start.</p>
212    pub fn set_start_position(mut self, input: ::std::option::Option<crate::types::StartPosition>) -> Self {
213        self.inner = self.inner.set_start_position(input);
214        self
215    }
216    /// <p>A filtering option for where to start.</p>
217    pub fn get_start_position(&self) -> &::std::option::Option<crate::types::StartPosition> {
218        self.inner.get_start_position()
219    }
220    /// <p>The authentication token associated with the participant's connection.</p>
221    pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.inner = self.inner.connection_token(input.into());
223        self
224    }
225    /// <p>The authentication token associated with the participant's connection.</p>
226    pub fn set_connection_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_connection_token(input);
228        self
229    }
230    /// <p>The authentication token associated with the participant's connection.</p>
231    pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> {
232        self.inner.get_connection_token()
233    }
234}