Skip to main content

aws_sdk_lexmodelsv2/operation/list_aggregated_utterances/
_list_aggregated_utterances_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 ListAggregatedUtterancesInput {
6    /// <p>The unique identifier of the bot associated with this request.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.</p>
9    pub bot_alias_id: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.</p>
11    pub bot_version: ::std::option::Option<::std::string::String>,
12    /// <p>The identifier of the language and locale where the utterances were collected. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
13    pub locale_id: ::std::option::Option<::std::string::String>,
14    /// <p>The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.</p>
15    pub aggregation_duration: ::std::option::Option<crate::types::UtteranceAggregationDuration>,
16    /// <p>Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.</p>
17    pub sort_by: ::std::option::Option<crate::types::AggregatedUtterancesSortBy>,
18    /// <p>Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.</p>
19    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::AggregatedUtterancesFilter>>,
20    /// <p>The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the <code>maxResults</code> parameter, 1,000 results are returned.</p>
21    pub max_results: ::std::option::Option<i32>,
22    /// <p>If the response from the <code>ListAggregatedUtterances</code> operation contains more results that specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.</p>
23    pub next_token: ::std::option::Option<::std::string::String>,
24}
25impl ListAggregatedUtterancesInput {
26    /// <p>The unique identifier of the bot associated with this request.</p>
27    pub fn bot_id(&self) -> ::std::option::Option<&str> {
28        self.bot_id.as_deref()
29    }
30    /// <p>The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.</p>
31    pub fn bot_alias_id(&self) -> ::std::option::Option<&str> {
32        self.bot_alias_id.as_deref()
33    }
34    /// <p>The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.</p>
35    pub fn bot_version(&self) -> ::std::option::Option<&str> {
36        self.bot_version.as_deref()
37    }
38    /// <p>The identifier of the language and locale where the utterances were collected. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
39    pub fn locale_id(&self) -> ::std::option::Option<&str> {
40        self.locale_id.as_deref()
41    }
42    /// <p>The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.</p>
43    pub fn aggregation_duration(&self) -> ::std::option::Option<&crate::types::UtteranceAggregationDuration> {
44        self.aggregation_duration.as_ref()
45    }
46    /// <p>Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.</p>
47    pub fn sort_by(&self) -> ::std::option::Option<&crate::types::AggregatedUtterancesSortBy> {
48        self.sort_by.as_ref()
49    }
50    /// <p>Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.</p>
51    ///
52    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
53    pub fn filters(&self) -> &[crate::types::AggregatedUtterancesFilter] {
54        self.filters.as_deref().unwrap_or_default()
55    }
56    /// <p>The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the <code>maxResults</code> parameter, 1,000 results are returned.</p>
57    pub fn max_results(&self) -> ::std::option::Option<i32> {
58        self.max_results
59    }
60    /// <p>If the response from the <code>ListAggregatedUtterances</code> operation contains more results that specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.</p>
61    pub fn next_token(&self) -> ::std::option::Option<&str> {
62        self.next_token.as_deref()
63    }
64}
65impl ListAggregatedUtterancesInput {
66    /// Creates a new builder-style object to manufacture [`ListAggregatedUtterancesInput`](crate::operation::list_aggregated_utterances::ListAggregatedUtterancesInput).
67    pub fn builder() -> crate::operation::list_aggregated_utterances::builders::ListAggregatedUtterancesInputBuilder {
68        crate::operation::list_aggregated_utterances::builders::ListAggregatedUtterancesInputBuilder::default()
69    }
70}
71
72/// A builder for [`ListAggregatedUtterancesInput`](crate::operation::list_aggregated_utterances::ListAggregatedUtterancesInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct ListAggregatedUtterancesInputBuilder {
76    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
77    pub(crate) bot_alias_id: ::std::option::Option<::std::string::String>,
78    pub(crate) bot_version: ::std::option::Option<::std::string::String>,
79    pub(crate) locale_id: ::std::option::Option<::std::string::String>,
80    pub(crate) aggregation_duration: ::std::option::Option<crate::types::UtteranceAggregationDuration>,
81    pub(crate) sort_by: ::std::option::Option<crate::types::AggregatedUtterancesSortBy>,
82    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::AggregatedUtterancesFilter>>,
83    pub(crate) max_results: ::std::option::Option<i32>,
84    pub(crate) next_token: ::std::option::Option<::std::string::String>,
85}
86impl ListAggregatedUtterancesInputBuilder {
87    /// <p>The unique identifier of the bot associated with this request.</p>
88    /// This field is required.
89    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.bot_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The unique identifier of the bot associated with this request.</p>
94    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.bot_id = input;
96        self
97    }
98    /// <p>The unique identifier of the bot associated with this request.</p>
99    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.bot_id
101    }
102    /// <p>The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.</p>
103    pub fn bot_alias_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.bot_alias_id = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.</p>
108    pub fn set_bot_alias_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.bot_alias_id = input;
110        self
111    }
112    /// <p>The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.</p>
113    pub fn get_bot_alias_id(&self) -> &::std::option::Option<::std::string::String> {
114        &self.bot_alias_id
115    }
116    /// <p>The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.</p>
117    pub fn bot_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.bot_version = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.</p>
122    pub fn set_bot_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.bot_version = input;
124        self
125    }
126    /// <p>The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.</p>
127    pub fn get_bot_version(&self) -> &::std::option::Option<::std::string::String> {
128        &self.bot_version
129    }
130    /// <p>The identifier of the language and locale where the utterances were collected. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
131    /// This field is required.
132    pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.locale_id = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The identifier of the language and locale where the utterances were collected. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
137    pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.locale_id = input;
139        self
140    }
141    /// <p>The identifier of the language and locale where the utterances were collected. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
142    pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
143        &self.locale_id
144    }
145    /// <p>The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.</p>
146    /// This field is required.
147    pub fn aggregation_duration(mut self, input: crate::types::UtteranceAggregationDuration) -> Self {
148        self.aggregation_duration = ::std::option::Option::Some(input);
149        self
150    }
151    /// <p>The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.</p>
152    pub fn set_aggregation_duration(mut self, input: ::std::option::Option<crate::types::UtteranceAggregationDuration>) -> Self {
153        self.aggregation_duration = input;
154        self
155    }
156    /// <p>The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.</p>
157    pub fn get_aggregation_duration(&self) -> &::std::option::Option<crate::types::UtteranceAggregationDuration> {
158        &self.aggregation_duration
159    }
160    /// <p>Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.</p>
161    pub fn sort_by(mut self, input: crate::types::AggregatedUtterancesSortBy) -> Self {
162        self.sort_by = ::std::option::Option::Some(input);
163        self
164    }
165    /// <p>Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.</p>
166    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::AggregatedUtterancesSortBy>) -> Self {
167        self.sort_by = input;
168        self
169    }
170    /// <p>Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.</p>
171    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::AggregatedUtterancesSortBy> {
172        &self.sort_by
173    }
174    /// Appends an item to `filters`.
175    ///
176    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
177    ///
178    /// <p>Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.</p>
179    pub fn filters(mut self, input: crate::types::AggregatedUtterancesFilter) -> Self {
180        let mut v = self.filters.unwrap_or_default();
181        v.push(input);
182        self.filters = ::std::option::Option::Some(v);
183        self
184    }
185    /// <p>Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.</p>
186    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AggregatedUtterancesFilter>>) -> Self {
187        self.filters = input;
188        self
189    }
190    /// <p>Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.</p>
191    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AggregatedUtterancesFilter>> {
192        &self.filters
193    }
194    /// <p>The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the <code>maxResults</code> parameter, 1,000 results are returned.</p>
195    pub fn max_results(mut self, input: i32) -> Self {
196        self.max_results = ::std::option::Option::Some(input);
197        self
198    }
199    /// <p>The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the <code>maxResults</code> parameter, 1,000 results are returned.</p>
200    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
201        self.max_results = input;
202        self
203    }
204    /// <p>The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the <code>maxResults</code> parameter, 1,000 results are returned.</p>
205    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
206        &self.max_results
207    }
208    /// <p>If the response from the <code>ListAggregatedUtterances</code> operation contains more results that specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.</p>
209    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.next_token = ::std::option::Option::Some(input.into());
211        self
212    }
213    /// <p>If the response from the <code>ListAggregatedUtterances</code> operation contains more results that specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.</p>
214    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.next_token = input;
216        self
217    }
218    /// <p>If the response from the <code>ListAggregatedUtterances</code> operation contains more results that specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.</p>
219    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
220        &self.next_token
221    }
222    /// Consumes the builder and constructs a [`ListAggregatedUtterancesInput`](crate::operation::list_aggregated_utterances::ListAggregatedUtterancesInput).
223    pub fn build(
224        self,
225    ) -> ::std::result::Result<
226        crate::operation::list_aggregated_utterances::ListAggregatedUtterancesInput,
227        ::aws_smithy_types::error::operation::BuildError,
228    > {
229        ::std::result::Result::Ok(crate::operation::list_aggregated_utterances::ListAggregatedUtterancesInput {
230            bot_id: self.bot_id,
231            bot_alias_id: self.bot_alias_id,
232            bot_version: self.bot_version,
233            locale_id: self.locale_id,
234            aggregation_duration: self.aggregation_duration,
235            sort_by: self.sort_by,
236            filters: self.filters,
237            max_results: self.max_results,
238            next_token: self.next_token,
239        })
240    }
241}