pub struct ListConfigsPaginator<
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::list_configs_input::Builder,
}
impl<C, M, R> ListConfigsPaginator<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::list_configs_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListConfigsPaginatorItems<C, M, R> {
crate::paginator::ListConfigsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListConfigsOutput,
aws_smithy_http::result::SdkError<crate::error::ListConfigsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListConfigsInputOperationOutputAlias,
crate::output::ListConfigsOutput,
crate::error::ListConfigsError,
crate::input::ListConfigsInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_configs_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListContactsPaginator<
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::list_contacts_input::Builder,
}
impl<C, M, R> ListContactsPaginator<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::list_contacts_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListContactsPaginatorItems<C, M, R> {
crate::paginator::ListContactsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListContactsOutput,
aws_smithy_http::result::SdkError<crate::error::ListContactsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListContactsInputOperationOutputAlias,
crate::output::ListContactsOutput,
crate::error::ListContactsError,
crate::input::ListContactsInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_contacts_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListDataflowEndpointGroupsPaginator<
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::list_dataflow_endpoint_groups_input::Builder,
}
impl<C, M, R> ListDataflowEndpointGroupsPaginator<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::list_dataflow_endpoint_groups_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListDataflowEndpointGroupsPaginatorItems<C, M, R> {
crate::paginator::ListDataflowEndpointGroupsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListDataflowEndpointGroupsOutput,
aws_smithy_http::result::SdkError<crate::error::ListDataflowEndpointGroupsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListDataflowEndpointGroupsInputOperationOutputAlias,
crate::output::ListDataflowEndpointGroupsOutput,
crate::error::ListDataflowEndpointGroupsError,
crate::input::ListDataflowEndpointGroupsInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_dataflow_endpoint_groups_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListGroundStationsPaginator<
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::list_ground_stations_input::Builder,
}
impl<C, M, R> ListGroundStationsPaginator<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::list_ground_stations_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListGroundStationsPaginatorItems<C, M, R> {
crate::paginator::ListGroundStationsPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListGroundStationsOutput,
aws_smithy_http::result::SdkError<crate::error::ListGroundStationsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGroundStationsInputOperationOutputAlias,
crate::output::ListGroundStationsOutput,
crate::error::ListGroundStationsError,
crate::input::ListGroundStationsInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_ground_stations_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListMissionProfilesPaginator<
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::list_mission_profiles_input::Builder,
}
impl<C, M, R> ListMissionProfilesPaginator<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::list_mission_profiles_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListMissionProfilesPaginatorItems<C, M, R> {
crate::paginator::ListMissionProfilesPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListMissionProfilesOutput,
aws_smithy_http::result::SdkError<crate::error::ListMissionProfilesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListMissionProfilesInputOperationOutputAlias,
crate::output::ListMissionProfilesOutput,
crate::error::ListMissionProfilesError,
crate::input::ListMissionProfilesInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_mission_profiles_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListSatellitesPaginator<
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::list_satellites_input::Builder,
}
impl<C, M, R> ListSatellitesPaginator<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::list_satellites_input::Builder,
) -> Self {
Self { handle, builder }
}
pub fn page_size(mut self, limit: i32) -> Self {
self.builder.max_results = Some(limit);
self
}
pub fn items(self) -> crate::paginator::ListSatellitesPaginatorItems<C, M, R> {
crate::paginator::ListSatellitesPaginatorItems(self)
}
pub fn send(
self,
) -> impl tokio_stream::Stream<
Item = std::result::Result<
crate::output::ListSatellitesOutput,
aws_smithy_http::result::SdkError<crate::error::ListSatellitesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListSatellitesInputOperationOutputAlias,
crate::output::ListSatellitesOutput,
crate::error::ListSatellitesError,
crate::input::ListSatellitesInputOperationRetryAlias,
>,
{
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) => {
input.next_token = crate::lens::reflens_structure_crate_output_list_satellites_output_next_token(resp).cloned();
input.next_token.is_none()
}
Err(_) => true,
};
if tx.send(resp).await.is_err() {
return;
}
if done {
return;
}
}
})
})
}
}
pub struct ListConfigsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListConfigsPaginator<C, M, R>);
impl<C, M, R> ListConfigsPaginatorItems<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::ConfigListItem,
aws_smithy_http::result::SdkError<crate::error::ListConfigsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListConfigsInputOperationOutputAlias,
crate::output::ListConfigsOutput,
crate::error::ListConfigsError,
crate::input::ListConfigsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_configs_output_config_list(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListContactsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListContactsPaginator<C, M, R>);
impl<C, M, R> ListContactsPaginatorItems<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::ContactData,
aws_smithy_http::result::SdkError<crate::error::ListContactsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListContactsInputOperationOutputAlias,
crate::output::ListContactsOutput,
crate::error::ListContactsError,
crate::input::ListContactsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_contacts_output_contact_list(page)
.unwrap_or_default()
.into_iter()
})
}
}
pub struct ListDataflowEndpointGroupsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListDataflowEndpointGroupsPaginator<C, M, R>);
impl<C, M, R> ListDataflowEndpointGroupsPaginatorItems<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::DataflowEndpointListItem,
aws_smithy_http::result::SdkError<crate::error::ListDataflowEndpointGroupsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListDataflowEndpointGroupsInputOperationOutputAlias,
crate::output::ListDataflowEndpointGroupsOutput,
crate::error::ListDataflowEndpointGroupsError,
crate::input::ListDataflowEndpointGroupsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| crate::lens::lens_structure_crate_output_list_dataflow_endpoint_groups_output_dataflow_endpoint_group_list(page).unwrap_or_default().into_iter())
}
}
pub struct ListGroundStationsPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListGroundStationsPaginator<C, M, R>);
impl<C, M, R> ListGroundStationsPaginatorItems<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::GroundStationData,
aws_smithy_http::result::SdkError<crate::error::ListGroundStationsError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListGroundStationsInputOperationOutputAlias,
crate::output::ListGroundStationsOutput,
crate::error::ListGroundStationsError,
crate::input::ListGroundStationsInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| crate::lens::lens_structure_crate_output_list_ground_stations_output_ground_station_list(page).unwrap_or_default().into_iter())
}
}
pub struct ListMissionProfilesPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListMissionProfilesPaginator<C, M, R>);
impl<C, M, R> ListMissionProfilesPaginatorItems<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::MissionProfileListItem,
aws_smithy_http::result::SdkError<crate::error::ListMissionProfilesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListMissionProfilesInputOperationOutputAlias,
crate::output::ListMissionProfilesOutput,
crate::error::ListMissionProfilesError,
crate::input::ListMissionProfilesInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| crate::lens::lens_structure_crate_output_list_mission_profiles_output_mission_profile_list(page).unwrap_or_default().into_iter())
}
}
pub struct ListSatellitesPaginatorItems<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
>(ListSatellitesPaginator<C, M, R>);
impl<C, M, R> ListSatellitesPaginatorItems<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::SatelliteListItem,
aws_smithy_http::result::SdkError<crate::error::ListSatellitesError>,
>,
> + Unpin
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListSatellitesInputOperationOutputAlias,
crate::output::ListSatellitesOutput,
crate::error::ListSatellitesError,
crate::input::ListSatellitesInputOperationRetryAlias,
>,
{
aws_smithy_async::future::fn_stream::TryFlatMap::new(self.0.send()).flat_map(|page| {
crate::lens::lens_structure_crate_output_list_satellites_output_satellites(page)
.unwrap_or_default()
.into_iter()
})
}
}