Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.52.0 (#84)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: improper types in pagers generation
PiperOrigin-RevId: 399773015

Source-Link: googleapis/googleapis@410c184

Source-Link: https://github.com/googleapis/googleapis-gen/commit/290e883545e3ac9ff2bd00cd0dacb28f1b8ca945
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwZTg4MzU0NWUzYWM5ZmYyYmQwMGNkMGRhY2IyOGYxYjhjYTk0NSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 30, 2021
1 parent 7f8a513 commit b83e28b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions google/cloud/networkconnectivity_v1/services/hub_service/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.networkconnectivity_v1.types import hub
Expand Down Expand Up @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[hub.ListHubsResponse]:
def pages(self) -> Iterator[hub.ListHubsResponse]:
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[hub.Hub]:
def __iter__(self) -> Iterator[hub.Hub]:
for page in self.pages:
yield from page.hubs

Expand Down Expand Up @@ -136,14 +136,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[hub.ListHubsResponse]:
async def pages(self) -> AsyncIterator[hub.ListHubsResponse]:
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[hub.Hub]:
def __aiter__(self) -> AsyncIterator[hub.Hub]:
async def async_generator():
async for page in self.pages:
for response in page.hubs:
Expand Down Expand Up @@ -202,14 +202,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[hub.ListSpokesResponse]:
def pages(self) -> Iterator[hub.ListSpokesResponse]:
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[hub.Spoke]:
def __iter__(self) -> Iterator[hub.Spoke]:
for page in self.pages:
yield from page.spokes

Expand Down Expand Up @@ -264,14 +264,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[hub.ListSpokesResponse]:
async def pages(self) -> AsyncIterator[hub.ListSpokesResponse]:
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[hub.Spoke]:
def __aiter__(self) -> AsyncIterator[hub.Spoke]:
async def async_generator():
async for page in self.pages:
for response in page.spokes:
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.networkconnectivity_v1alpha1.types import hub
Expand Down Expand Up @@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[hub.ListHubsResponse]:
def pages(self) -> Iterator[hub.ListHubsResponse]:
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[hub.Hub]:
def __iter__(self) -> Iterator[hub.Hub]:
for page in self.pages:
yield from page.hubs

Expand Down Expand Up @@ -136,14 +136,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[hub.ListHubsResponse]:
async def pages(self) -> AsyncIterator[hub.ListHubsResponse]:
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[hub.Hub]:
def __aiter__(self) -> AsyncIterator[hub.Hub]:
async def async_generator():
async for page in self.pages:
for response in page.hubs:
Expand Down Expand Up @@ -202,14 +202,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[hub.ListSpokesResponse]:
def pages(self) -> Iterator[hub.ListSpokesResponse]:
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[hub.Spoke]:
def __iter__(self) -> Iterator[hub.Spoke]:
for page in self.pages:
yield from page.spokes

Expand Down Expand Up @@ -264,14 +264,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[hub.ListSpokesResponse]:
async def pages(self) -> AsyncIterator[hub.ListSpokesResponse]:
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[hub.Spoke]:
def __aiter__(self) -> AsyncIterator[hub.Spoke]:
async def async_generator():
async for page in self.pages:
for response in page.spokes:
Expand Down

0 comments on commit b83e28b

Please sign in to comment.