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

Commit

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

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

Source-Link: googleapis/googleapis@410c184

Source-Link: googleapis/googleapis-gen@290e883
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwZTg4MzU0NWUzYWM5ZmYyYmQwMGNkMGRhY2IyOGYxYjhjYTk0NSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 30, 2021
1 parent 25fa805 commit fa08cbf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
28 changes: 14 additions & 14 deletions google/cloud/asset_v1/services/asset_service/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[asset_service.ListAssetsResponse]:
def pages(self) -> Iterator[asset_service.ListAssetsResponse]:
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[assets.Asset]:
def __iter__(self) -> Iterator[assets.Asset]:
for page in self.pages:
yield from page.assets

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

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

@property
def pages(self) -> Iterable[asset_service.SearchAllResourcesResponse]:
def pages(self) -> Iterator[asset_service.SearchAllResourcesResponse]:
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[assets.ResourceSearchResult]:
def __iter__(self) -> Iterator[assets.ResourceSearchResult]:
for page in self.pages:
yield from page.results

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

@property
async def pages(self) -> AsyncIterable[asset_service.SearchAllResourcesResponse]:
async def pages(self) -> AsyncIterator[asset_service.SearchAllResourcesResponse]:
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[assets.ResourceSearchResult]:
def __aiter__(self) -> AsyncIterator[assets.ResourceSearchResult]:
async def async_generator():
async for page in self.pages:
for response in page.results:
Expand Down Expand Up @@ -331,14 +331,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[asset_service.SearchAllIamPoliciesResponse]:
def pages(self) -> Iterator[asset_service.SearchAllIamPoliciesResponse]:
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[assets.IamPolicySearchResult]:
def __iter__(self) -> Iterator[assets.IamPolicySearchResult]:
for page in self.pages:
yield from page.results

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

@property
async def pages(self) -> AsyncIterable[asset_service.SearchAllIamPoliciesResponse]:
async def pages(self) -> AsyncIterator[asset_service.SearchAllIamPoliciesResponse]:
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[assets.IamPolicySearchResult]:
def __aiter__(self) -> AsyncIterator[assets.IamPolicySearchResult]:
async def async_generator():
async for page in self.pages:
for response in page.results:
Expand Down
20 changes: 10 additions & 10 deletions google/cloud/asset_v1p1beta1/services/asset_service/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[asset_service.SearchAllResourcesResponse]:
def pages(self) -> Iterator[asset_service.SearchAllResourcesResponse]:
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[assets.StandardResourceMetadata]:
def __iter__(self) -> Iterator[assets.StandardResourceMetadata]:
for page in self.pages:
yield from page.results

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

@property
async def pages(self) -> AsyncIterable[asset_service.SearchAllResourcesResponse]:
async def pages(self) -> AsyncIterator[asset_service.SearchAllResourcesResponse]:
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[assets.StandardResourceMetadata]:
def __aiter__(self) -> AsyncIterator[assets.StandardResourceMetadata]:
async def async_generator():
async for page in self.pages:
for response in page.results:
Expand Down Expand Up @@ -203,14 +203,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[asset_service.SearchAllIamPoliciesResponse]:
def pages(self) -> Iterator[asset_service.SearchAllIamPoliciesResponse]:
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[assets.IamPolicySearchResult]:
def __iter__(self) -> Iterator[assets.IamPolicySearchResult]:
for page in self.pages:
yield from page.results

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

@property
async def pages(self) -> AsyncIterable[asset_service.SearchAllIamPoliciesResponse]:
async def pages(self) -> AsyncIterator[asset_service.SearchAllIamPoliciesResponse]:
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[assets.IamPolicySearchResult]:
def __aiter__(self) -> AsyncIterator[assets.IamPolicySearchResult]:
async def async_generator():
async for page in self.pages:
for response in page.results:
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/asset_v1p5beta1/services/asset_service/pagers.py
Expand Up @@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

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

@property
def pages(self) -> Iterable[asset_service.ListAssetsResponse]:
def pages(self) -> Iterator[asset_service.ListAssetsResponse]:
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[assets.Asset]:
def __iter__(self) -> Iterator[assets.Asset]:
for page in self.pages:
yield from page.assets

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

@property
async def pages(self) -> AsyncIterable[asset_service.ListAssetsResponse]:
async def pages(self) -> AsyncIterator[asset_service.ListAssetsResponse]:
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[assets.Asset]:
def __aiter__(self) -> AsyncIterator[assets.Asset]:
async def async_generator():
async for page in self.pages:
for response in page.assets:
Expand Down

0 comments on commit fa08cbf

Please sign in to comment.