aws_sdk_connectparticipant/operation/get_transcript/
_get_transcript_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, ::std::fmt::Debug)]
5pub struct GetTranscriptInput {
6    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
7    pub contact_id: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum number of results to return in the page. Default: 10.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
13    pub scan_direction: ::std::option::Option<crate::types::ScanDirection>,
14    /// <p>The sort order for the records. Default: DESCENDING.</p>
15    pub sort_order: ::std::option::Option<crate::types::SortKey>,
16    /// <p>A filtering option for where to start.</p>
17    pub start_position: ::std::option::Option<crate::types::StartPosition>,
18    /// <p>The authentication token associated with the participant's connection.</p>
19    pub connection_token: ::std::option::Option<::std::string::String>,
20}
21impl GetTranscriptInput {
22    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
23    pub fn contact_id(&self) -> ::std::option::Option<&str> {
24        self.contact_id.as_deref()
25    }
26    /// <p>The maximum number of results to return in the page. Default: 10.</p>
27    pub fn max_results(&self) -> ::std::option::Option<i32> {
28        self.max_results
29    }
30    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
31    pub fn next_token(&self) -> ::std::option::Option<&str> {
32        self.next_token.as_deref()
33    }
34    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
35    pub fn scan_direction(&self) -> ::std::option::Option<&crate::types::ScanDirection> {
36        self.scan_direction.as_ref()
37    }
38    /// <p>The sort order for the records. Default: DESCENDING.</p>
39    pub fn sort_order(&self) -> ::std::option::Option<&crate::types::SortKey> {
40        self.sort_order.as_ref()
41    }
42    /// <p>A filtering option for where to start.</p>
43    pub fn start_position(&self) -> ::std::option::Option<&crate::types::StartPosition> {
44        self.start_position.as_ref()
45    }
46    /// <p>The authentication token associated with the participant's connection.</p>
47    pub fn connection_token(&self) -> ::std::option::Option<&str> {
48        self.connection_token.as_deref()
49    }
50}
51impl GetTranscriptInput {
52    /// Creates a new builder-style object to manufacture [`GetTranscriptInput`](crate::operation::get_transcript::GetTranscriptInput).
53    pub fn builder() -> crate::operation::get_transcript::builders::GetTranscriptInputBuilder {
54        crate::operation::get_transcript::builders::GetTranscriptInputBuilder::default()
55    }
56}
57
58/// A builder for [`GetTranscriptInput`](crate::operation::get_transcript::GetTranscriptInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct GetTranscriptInputBuilder {
62    pub(crate) contact_id: ::std::option::Option<::std::string::String>,
63    pub(crate) max_results: ::std::option::Option<i32>,
64    pub(crate) next_token: ::std::option::Option<::std::string::String>,
65    pub(crate) scan_direction: ::std::option::Option<crate::types::ScanDirection>,
66    pub(crate) sort_order: ::std::option::Option<crate::types::SortKey>,
67    pub(crate) start_position: ::std::option::Option<crate::types::StartPosition>,
68    pub(crate) connection_token: ::std::option::Option<::std::string::String>,
69}
70impl GetTranscriptInputBuilder {
71    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
72    pub fn contact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.contact_id = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
77    pub fn set_contact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.contact_id = input;
79        self
80    }
81    /// <p>The contactId from the current contact chain for which transcript is needed.</p>
82    pub fn get_contact_id(&self) -> &::std::option::Option<::std::string::String> {
83        &self.contact_id
84    }
85    /// <p>The maximum number of results to return in the page. Default: 10.</p>
86    pub fn max_results(mut self, input: i32) -> Self {
87        self.max_results = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The maximum number of results to return in the page. Default: 10.</p>
91    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
92        self.max_results = input;
93        self
94    }
95    /// <p>The maximum number of results to return in the page. Default: 10.</p>
96    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
97        &self.max_results
98    }
99    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
100    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.next_token = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
105    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.next_token = input;
107        self
108    }
109    /// <p>The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.</p>
110    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
111        &self.next_token
112    }
113    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
114    pub fn scan_direction(mut self, input: crate::types::ScanDirection) -> Self {
115        self.scan_direction = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
119    pub fn set_scan_direction(mut self, input: ::std::option::Option<crate::types::ScanDirection>) -> Self {
120        self.scan_direction = input;
121        self
122    }
123    /// <p>The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.</p>
124    pub fn get_scan_direction(&self) -> &::std::option::Option<crate::types::ScanDirection> {
125        &self.scan_direction
126    }
127    /// <p>The sort order for the records. Default: DESCENDING.</p>
128    pub fn sort_order(mut self, input: crate::types::SortKey) -> Self {
129        self.sort_order = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The sort order for the records. Default: DESCENDING.</p>
133    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::SortKey>) -> Self {
134        self.sort_order = input;
135        self
136    }
137    /// <p>The sort order for the records. Default: DESCENDING.</p>
138    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::SortKey> {
139        &self.sort_order
140    }
141    /// <p>A filtering option for where to start.</p>
142    pub fn start_position(mut self, input: crate::types::StartPosition) -> Self {
143        self.start_position = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>A filtering option for where to start.</p>
147    pub fn set_start_position(mut self, input: ::std::option::Option<crate::types::StartPosition>) -> Self {
148        self.start_position = input;
149        self
150    }
151    /// <p>A filtering option for where to start.</p>
152    pub fn get_start_position(&self) -> &::std::option::Option<crate::types::StartPosition> {
153        &self.start_position
154    }
155    /// <p>The authentication token associated with the participant's connection.</p>
156    /// This field is required.
157    pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.connection_token = ::std::option::Option::Some(input.into());
159        self
160    }
161    /// <p>The authentication token associated with the participant's connection.</p>
162    pub fn set_connection_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.connection_token = input;
164        self
165    }
166    /// <p>The authentication token associated with the participant's connection.</p>
167    pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> {
168        &self.connection_token
169    }
170    /// Consumes the builder and constructs a [`GetTranscriptInput`](crate::operation::get_transcript::GetTranscriptInput).
171    pub fn build(
172        self,
173    ) -> ::std::result::Result<crate::operation::get_transcript::GetTranscriptInput, ::aws_smithy_types::error::operation::BuildError> {
174        ::std::result::Result::Ok(crate::operation::get_transcript::GetTranscriptInput {
175            contact_id: self.contact_id,
176            max_results: self.max_results,
177            next_token: self.next_token,
178            scan_direction: self.scan_direction,
179            sort_order: self.sort_order,
180            start_position: self.start_position,
181            connection_token: self.connection_token,
182        })
183    }
184}