|
15 | 15 | # |
16 | 16 | from typing import ( |
17 | 17 | Any, |
18 | | - AsyncIterable, |
| 18 | + AsyncIterator, |
19 | 19 | Awaitable, |
20 | 20 | Callable, |
21 | | - Iterable, |
22 | 21 | Sequence, |
23 | 22 | Tuple, |
24 | 23 | Optional, |
| 24 | + Iterator, |
25 | 25 | ) |
26 | 26 |
|
27 | 27 | from google.cloud.contact_center_insights_v1.types import contact_center_insights |
@@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any: |
75 | 75 | return getattr(self._response, name) |
76 | 76 |
|
77 | 77 | @property |
78 | | - def pages(self) -> Iterable[contact_center_insights.ListConversationsResponse]: |
| 78 | + def pages(self) -> Iterator[contact_center_insights.ListConversationsResponse]: |
79 | 79 | yield self._response |
80 | 80 | while self._response.next_page_token: |
81 | 81 | self._request.page_token = self._response.next_page_token |
82 | 82 | self._response = self._method(self._request, metadata=self._metadata) |
83 | 83 | yield self._response |
84 | 84 |
|
85 | | - def __iter__(self) -> Iterable[resources.Conversation]: |
| 85 | + def __iter__(self) -> Iterator[resources.Conversation]: |
86 | 86 | for page in self.pages: |
87 | 87 | yield from page.conversations |
88 | 88 |
|
@@ -141,14 +141,14 @@ def __getattr__(self, name: str) -> Any: |
141 | 141 | @property |
142 | 142 | async def pages( |
143 | 143 | self, |
144 | | - ) -> AsyncIterable[contact_center_insights.ListConversationsResponse]: |
| 144 | + ) -> AsyncIterator[contact_center_insights.ListConversationsResponse]: |
145 | 145 | yield self._response |
146 | 146 | while self._response.next_page_token: |
147 | 147 | self._request.page_token = self._response.next_page_token |
148 | 148 | self._response = await self._method(self._request, metadata=self._metadata) |
149 | 149 | yield self._response |
150 | 150 |
|
151 | | - def __aiter__(self) -> AsyncIterable[resources.Conversation]: |
| 151 | + def __aiter__(self) -> AsyncIterator[resources.Conversation]: |
152 | 152 | async def async_generator(): |
153 | 153 | async for page in self.pages: |
154 | 154 | for response in page.conversations: |
@@ -207,14 +207,14 @@ def __getattr__(self, name: str) -> Any: |
207 | 207 | return getattr(self._response, name) |
208 | 208 |
|
209 | 209 | @property |
210 | | - def pages(self) -> Iterable[contact_center_insights.ListAnalysesResponse]: |
| 210 | + def pages(self) -> Iterator[contact_center_insights.ListAnalysesResponse]: |
211 | 211 | yield self._response |
212 | 212 | while self._response.next_page_token: |
213 | 213 | self._request.page_token = self._response.next_page_token |
214 | 214 | self._response = self._method(self._request, metadata=self._metadata) |
215 | 215 | yield self._response |
216 | 216 |
|
217 | | - def __iter__(self) -> Iterable[resources.Analysis]: |
| 217 | + def __iter__(self) -> Iterator[resources.Analysis]: |
218 | 218 | for page in self.pages: |
219 | 219 | yield from page.analyses |
220 | 220 |
|
@@ -271,14 +271,14 @@ def __getattr__(self, name: str) -> Any: |
271 | 271 | @property |
272 | 272 | async def pages( |
273 | 273 | self, |
274 | | - ) -> AsyncIterable[contact_center_insights.ListAnalysesResponse]: |
| 274 | + ) -> AsyncIterator[contact_center_insights.ListAnalysesResponse]: |
275 | 275 | yield self._response |
276 | 276 | while self._response.next_page_token: |
277 | 277 | self._request.page_token = self._response.next_page_token |
278 | 278 | self._response = await self._method(self._request, metadata=self._metadata) |
279 | 279 | yield self._response |
280 | 280 |
|
281 | | - def __aiter__(self) -> AsyncIterable[resources.Analysis]: |
| 281 | + def __aiter__(self) -> AsyncIterator[resources.Analysis]: |
282 | 282 | async def async_generator(): |
283 | 283 | async for page in self.pages: |
284 | 284 | for response in page.analyses: |
@@ -337,14 +337,14 @@ def __getattr__(self, name: str) -> Any: |
337 | 337 | return getattr(self._response, name) |
338 | 338 |
|
339 | 339 | @property |
340 | | - def pages(self) -> Iterable[contact_center_insights.ListPhraseMatchersResponse]: |
| 340 | + def pages(self) -> Iterator[contact_center_insights.ListPhraseMatchersResponse]: |
341 | 341 | yield self._response |
342 | 342 | while self._response.next_page_token: |
343 | 343 | self._request.page_token = self._response.next_page_token |
344 | 344 | self._response = self._method(self._request, metadata=self._metadata) |
345 | 345 | yield self._response |
346 | 346 |
|
347 | | - def __iter__(self) -> Iterable[resources.PhraseMatcher]: |
| 347 | + def __iter__(self) -> Iterator[resources.PhraseMatcher]: |
348 | 348 | for page in self.pages: |
349 | 349 | yield from page.phrase_matchers |
350 | 350 |
|
@@ -403,14 +403,14 @@ def __getattr__(self, name: str) -> Any: |
403 | 403 | @property |
404 | 404 | async def pages( |
405 | 405 | self, |
406 | | - ) -> AsyncIterable[contact_center_insights.ListPhraseMatchersResponse]: |
| 406 | + ) -> AsyncIterator[contact_center_insights.ListPhraseMatchersResponse]: |
407 | 407 | yield self._response |
408 | 408 | while self._response.next_page_token: |
409 | 409 | self._request.page_token = self._response.next_page_token |
410 | 410 | self._response = await self._method(self._request, metadata=self._metadata) |
411 | 411 | yield self._response |
412 | 412 |
|
413 | | - def __aiter__(self) -> AsyncIterable[resources.PhraseMatcher]: |
| 413 | + def __aiter__(self) -> AsyncIterator[resources.PhraseMatcher]: |
414 | 414 | async def async_generator(): |
415 | 415 | async for page in self.pages: |
416 | 416 | for response in page.phrase_matchers: |
|
0 commit comments