pub struct Builder { /* private fields */ }Expand description
A builder for ListAggregatedUtterancesInput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn bot_id(self, input: impl Into<String>) -> Self
pub fn bot_id(self, input: impl Into<String>) -> Self
The unique identifier of the bot associated with this request.
sourcepub fn set_bot_id(self, input: Option<String>) -> Self
pub fn set_bot_id(self, input: Option<String>) -> Self
The unique identifier of the bot associated with this request.
sourcepub fn bot_alias_id(self, input: impl Into<String>) -> Self
pub fn bot_alias_id(self, input: impl Into<String>) -> Self
The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.
sourcepub fn set_bot_alias_id(self, input: Option<String>) -> Self
pub fn set_bot_alias_id(self, input: Option<String>) -> Self
The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.
sourcepub fn bot_version(self, input: impl Into<String>) -> Self
pub fn bot_version(self, input: impl Into<String>) -> Self
The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.
sourcepub fn set_bot_version(self, input: Option<String>) -> Self
pub fn set_bot_version(self, input: Option<String>) -> Self
The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.
sourcepub fn locale_id(self, input: impl Into<String>) -> Self
pub fn locale_id(self, input: impl Into<String>) -> Self
The identifier of the language and locale where the utterances were collected. For more information, see Supported languages.
sourcepub fn set_locale_id(self, input: Option<String>) -> Self
pub fn set_locale_id(self, input: Option<String>) -> Self
The identifier of the language and locale where the utterances were collected. For more information, see Supported languages.
sourcepub fn aggregation_duration(self, input: UtteranceAggregationDuration) -> Self
pub fn aggregation_duration(self, input: UtteranceAggregationDuration) -> Self
The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.
sourcepub fn set_aggregation_duration(
self,
input: Option<UtteranceAggregationDuration>
) -> Self
pub fn set_aggregation_duration(
self,
input: Option<UtteranceAggregationDuration>
) -> Self
The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.
sourcepub fn sort_by(self, input: AggregatedUtterancesSortBy) -> Self
pub fn sort_by(self, input: AggregatedUtterancesSortBy) -> Self
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.
sourcepub fn set_sort_by(self, input: Option<AggregatedUtterancesSortBy>) -> Self
pub fn set_sort_by(self, input: Option<AggregatedUtterancesSortBy>) -> Self
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.
sourcepub fn filters(self, input: AggregatedUtterancesFilter) -> Self
pub fn filters(self, input: AggregatedUtterancesFilter) -> Self
Appends an item to filters.
To override the contents of this collection use set_filters.
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.
sourcepub fn set_filters(self, input: Option<Vec<AggregatedUtterancesFilter>>) -> Self
pub fn set_filters(self, input: Option<Vec<AggregatedUtterancesFilter>>) -> Self
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.
sourcepub fn max_results(self, input: i32) -> Self
pub fn max_results(self, input: i32) -> Self
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 maxResults parameter, 1,000 results are returned.
sourcepub fn set_max_results(self, input: Option<i32>) -> Self
pub fn set_max_results(self, input: Option<i32>) -> Self
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 maxResults parameter, 1,000 results are returned.
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
If the response from the ListAggregatedUtterances operation contains more results that specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
If the response from the ListAggregatedUtterances operation contains more results that specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
sourcepub fn build(self) -> Result<ListAggregatedUtterancesInput, BuildError>
pub fn build(self) -> Result<ListAggregatedUtterancesInput, BuildError>
Consumes the builder and constructs a ListAggregatedUtterancesInput.
Examples found in repository?
5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListAggregatedUtterances,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListAggregatedUtterancesError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListAggregatedUtterancesOutput,
aws_smithy_http::result::SdkError<crate::error::ListAggregatedUtterancesError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}More examples
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListAggregatedUtterancesOutput,
aws_smithy_http::result::SdkError<crate::error::ListAggregatedUtterancesError>,
>,
> + Unpin {
// Move individual fields out of self for the borrow checker
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
// Build the input for the first time. If required fields are missing, this is where we'll produce an early error.
let mut input = match builder
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)
{
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)
{
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
// If the input member is None or it was an error
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_list_aggregated_utterances_output_next_token(resp);
let is_empty = new_token.map(|token| token.is_empty()).unwrap_or(true);
if !is_empty
&& new_token == input.next_token.as_ref()
&& self.stop_on_duplicate_token
{
true
} else {
input.next_token = new_token.cloned();
is_empty
}
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
// receiving end was dropped
return;
}
if done {
return;
}
}
})
})
}