def iter_list_engagements(
self,
*,
config_overrides: Optional[SSMContactsClientConfig] = None,
next_token: Optional[
"capo_ssm_contacts.types.pagination_token.PaginationToken"
] = None,
max_results: Optional["capo_ssm_contacts.types.max_results.MaxResults"] = None,
incident_id: Optional["capo_ssm_contacts.types.incident_id.IncidentId"] = None,
time_range_value: Optional[
"capo_ssm_contacts.types.time_range.TimeRange"
] = None,
) -> "Iterator[capo_ssm_contacts.types.engagement.Engagement]":
_token = next_token
while True:
_response = self.list_engagements(
config_overrides=config_overrides,
next_token=_token,
max_results=max_results,
incident_id=incident_id,
time_range_value=time_range_value,
)
_page = _resolve_path(_response, ("engagements",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break