pub struct DescribeDestinationsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_destinations_input::Builder,
}
impl<C, M, R> DescribeDestinationsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_destinations_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::DescribeDestinationsPaginatorItems<C, M, R> {
crate::paginator::DescribeDestinationsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeDestinationsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeDestinationsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeDestinationsInputOperationOutputAlias,
crate::output::DescribeDestinationsOutput,
crate::error::DescribeDestinationsError,
crate::input::DescribeDestinationsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_destinations_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct DescribeLogGroupsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_log_groups_input::Builder,
}
impl<C, M, R> DescribeLogGroupsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_log_groups_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::DescribeLogGroupsPaginatorItems<C, M, R> {
crate::paginator::DescribeLogGroupsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeLogGroupsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLogGroupsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLogGroupsInputOperationOutputAlias,
crate::output::DescribeLogGroupsOutput,
crate::error::DescribeLogGroupsError,
crate::input::DescribeLogGroupsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_log_groups_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct DescribeLogStreamsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_log_streams_input::Builder,
}
impl<C, M, R> DescribeLogStreamsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_log_streams_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::DescribeLogStreamsPaginatorItems<C, M, R> {
crate::paginator::DescribeLogStreamsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeLogStreamsOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeLogStreamsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLogStreamsInputOperationOutputAlias,
crate::output::DescribeLogStreamsOutput,
crate::error::DescribeLogStreamsError,
crate::input::DescribeLogStreamsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_log_streams_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct DescribeMetricFiltersPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_metric_filters_input::Builder,
}
impl<C, M, R> DescribeMetricFiltersPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_metric_filters_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::DescribeMetricFiltersPaginatorItems<C, M, R> {
crate::paginator::DescribeMetricFiltersPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeMetricFiltersOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeMetricFiltersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeMetricFiltersInputOperationOutputAlias,
crate::output::DescribeMetricFiltersOutput,
crate::error::DescribeMetricFiltersError,
crate::input::DescribeMetricFiltersInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_metric_filters_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct DescribeSubscriptionFiltersPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_subscription_filters_input::Builder,
}
impl<C, M, R> DescribeSubscriptionFiltersPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::describe_subscription_filters_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::DescribeSubscriptionFiltersPaginatorItems<C, M, R> {
crate::paginator::DescribeSubscriptionFiltersPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::DescribeSubscriptionFiltersOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeSubscriptionFiltersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSubscriptionFiltersInputOperationOutputAlias,
crate::output::DescribeSubscriptionFiltersOutput,
crate::error::DescribeSubscriptionFiltersError,
crate::input::DescribeSubscriptionFiltersInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_describe_subscription_filters_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct FilterLogEventsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::filter_log_events_input::Builder,
}
impl<C, M, R> FilterLogEventsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::filter_log_events_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::FilterLogEventsOutput,
aws_smithy_http::result::SdkError<crate::error::FilterLogEventsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::FilterLogEventsInputOperationOutputAlias,
crate::output::FilterLogEventsOutput,
crate::error::FilterLogEventsError,
crate::input::FilterLogEventsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_filter_log_events_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct GetLogEventsPaginator<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::get_log_events_input::Builder,
}
impl<C, M, R> GetLogEventsPaginator<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub(crate) fn new(
handle: std::sync::Arc<crate::client::Handle<C, M, R>>,
builder: crate::input::get_log_events_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.limit = Some(limit);
self
}
pub fn items(self) -> crate::paginator::GetLogEventsPaginatorItems<C, M, R> {
crate::paginator::GetLogEventsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::GetLogEventsOutput,
aws_smithy_http::result::SdkError<crate::error::GetLogEventsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetLogEventsInputOperationOutputAlias,
crate::output::GetLogEventsOutput,
crate::error::GetLogEventsError,
crate::input::GetLogEventsInputOperationRetryAlias,
>,
{
let builder = self.builder;
let handle = self.handle;
aws_smithy_async::future::fn_stream::FnStream::new(move |tx| {
Box::pin(async move {
let mut input = match builder.build().map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(input) => input,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
loop {
let op = match input.make_operation(&handle.conf).await.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
}) {
Ok(op) => op,
Err(e) => {
let _ = tx.send(Err(e)).await;
return;
}
};
let resp = handle.client.call(op).await;
let done = match resp {
Ok(ref resp) => {
let new_token = crate::lens::reflens_structure_crate_output_get_log_events_output_next_forward_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() {
let _ = tx.send(Err(aws_smithy_http::result::SdkError::ConstructionFailure("next token did not change, aborting paginator. This indicates an SDK or AWS service bug.".into()))).await;
return;
}
input.next_token = new_token.cloned();
is_empty
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct DescribeDestinationsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(DescribeDestinationsPaginator<C, M, R>);
impl<C, M, R> DescribeDestinationsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::Destination,
aws_smithy_http::result::SdkError<crate::error::DescribeDestinationsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeDestinationsInputOperationOutputAlias,
crate::output::DescribeDestinationsOutput,
crate::error::DescribeDestinationsError,
crate::input::DescribeDestinationsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_describe_destinations_output_destinations(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct DescribeLogGroupsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(DescribeLogGroupsPaginator<C, M, R>);
impl<C, M, R> DescribeLogGroupsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::LogGroup,
aws_smithy_http::result::SdkError<crate::error::DescribeLogGroupsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLogGroupsInputOperationOutputAlias,
crate::output::DescribeLogGroupsOutput,
crate::error::DescribeLogGroupsError,
crate::input::DescribeLogGroupsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_describe_log_groups_output_log_groups(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct DescribeLogStreamsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(DescribeLogStreamsPaginator<C, M, R>);
impl<C, M, R> DescribeLogStreamsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::LogStream,
aws_smithy_http::result::SdkError<crate::error::DescribeLogStreamsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeLogStreamsInputOperationOutputAlias,
crate::output::DescribeLogStreamsOutput,
crate::error::DescribeLogStreamsError,
crate::input::DescribeLogStreamsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_describe_log_streams_output_log_streams(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct DescribeMetricFiltersPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(DescribeMetricFiltersPaginator<C, M, R>);
impl<C, M, R> DescribeMetricFiltersPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::MetricFilter,
aws_smithy_http::result::SdkError<crate::error::DescribeMetricFiltersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeMetricFiltersInputOperationOutputAlias,
crate::output::DescribeMetricFiltersOutput,
crate::error::DescribeMetricFiltersError,
crate::input::DescribeMetricFiltersInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_describe_metric_filters_output_metric_filters(
page,
)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct DescribeSubscriptionFiltersPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(DescribeSubscriptionFiltersPaginator<C, M, R>);
impl<C, M, R> DescribeSubscriptionFiltersPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::SubscriptionFilter,
aws_smithy_http::result::SdkError<crate::error::DescribeSubscriptionFiltersError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeSubscriptionFiltersInputOperationOutputAlias,
crate::output::DescribeSubscriptionFiltersOutput,
crate::error::DescribeSubscriptionFiltersError,
crate::input::DescribeSubscriptionFiltersInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| crate::lens::lens_structure_crate_output_describe_subscription_filters_output_subscription_filters(page).unwrap_or_default().into_iter())
}
}
pub struct GetLogEventsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(GetLogEventsPaginator<C, M, R>);
impl<C, M, R> GetLogEventsPaginatorItems<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::model::OutputLogEvent,
aws_smithy_http::result::SdkError<crate::error::GetLogEventsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetLogEventsInputOperationOutputAlias,
crate::output::GetLogEventsOutput,
crate::error::GetLogEventsError,
crate::input::GetLogEventsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_get_log_events_output_events(page)
.unwrap_or_default()
.into_iter()
})
}
}