Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions google/cloud/container_v1/services/cluster_manager/pagers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.container_v1.types import cluster_service
Expand Down Expand Up @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[cluster_service.ListUsableSubnetworksResponse]:
def pages(self) -> Iterator[cluster_service.ListUsableSubnetworksResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = self._method(self._request, metadata=self._metadata)
yield self._response

def __iter__(self) -> Iterable[cluster_service.UsableSubnetwork]:
def __iter__(self) -> Iterator[cluster_service.UsableSubnetwork]:
for page in self.pages:
yield from page.subnetworks

Expand Down Expand Up @@ -138,14 +138,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[cluster_service.ListUsableSubnetworksResponse]:
) -> AsyncIterator[cluster_service.ListUsableSubnetworksResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = await self._method(self._request, metadata=self._metadata)
yield self._response

def __aiter__(self) -> AsyncIterable[cluster_service.UsableSubnetwork]:
def __aiter__(self) -> AsyncIterator[cluster_service.UsableSubnetwork]:
async def async_generator():
async for page in self.pages:
for response in page.subnetworks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.container_v1beta1.types import cluster_service
Expand Down Expand Up @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[cluster_service.ListUsableSubnetworksResponse]:
def pages(self) -> Iterator[cluster_service.ListUsableSubnetworksResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = self._method(self._request, metadata=self._metadata)
yield self._response

def __iter__(self) -> Iterable[cluster_service.UsableSubnetwork]:
def __iter__(self) -> Iterator[cluster_service.UsableSubnetwork]:
for page in self.pages:
yield from page.subnetworks

Expand Down Expand Up @@ -138,14 +138,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[cluster_service.ListUsableSubnetworksResponse]:
) -> AsyncIterator[cluster_service.ListUsableSubnetworksResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = await self._method(self._request, metadata=self._metadata)
yield self._response

def __aiter__(self) -> AsyncIterable[cluster_service.UsableSubnetwork]:
def __aiter__(self) -> AsyncIterator[cluster_service.UsableSubnetwork]:
async def async_generator():
async for page in self.pages:
for response in page.subnetworks:
Expand Down