Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.52.0 (#89)
- [ ] 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 committed Sep 30, 2021
1 parent c13dacc commit 2d732875566d49e9eed8702a40120c427222d529
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.recommendationengine_v1beta1.types import catalog
@@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[catalog_service.ListCatalogItemsResponse]:
def pages(self) -> Iterator[catalog_service.ListCatalogItemsResponse]:
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[catalog.CatalogItem]:
def __iter__(self) -> Iterator[catalog.CatalogItem]:
for page in self.pages:
yield from page.catalog_items

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

@property
async def pages(self) -> AsyncIterable[catalog_service.ListCatalogItemsResponse]:
async def pages(self) -> AsyncIterator[catalog_service.ListCatalogItemsResponse]:
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[catalog.CatalogItem]:
def __aiter__(self) -> AsyncIterator[catalog.CatalogItem]:
async def async_generator():
async for page in self.pages:
for response in page.catalog_items:
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.recommendationengine_v1beta1.types import (
@@ -83,7 +83,7 @@ def __getattr__(self, name: str) -> Any:
@property
def pages(
self,
) -> Iterable[
) -> Iterator[
prediction_apikey_registry_service.ListPredictionApiKeyRegistrationsResponse
]:
yield self._response
@@ -94,7 +94,7 @@ def pages(

def __iter__(
self,
) -> Iterable[prediction_apikey_registry_service.PredictionApiKeyRegistration]:
) -> Iterator[prediction_apikey_registry_service.PredictionApiKeyRegistration]:
for page in self.pages:
yield from page.prediction_api_key_registrations

@@ -158,7 +158,7 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[
) -> AsyncIterator[
prediction_apikey_registry_service.ListPredictionApiKeyRegistrationsResponse
]:
yield self._response
@@ -169,7 +169,7 @@ async def pages(

def __aiter__(
self,
) -> AsyncIterable[prediction_apikey_registry_service.PredictionApiKeyRegistration]:
) -> AsyncIterator[prediction_apikey_registry_service.PredictionApiKeyRegistration]:
async def async_generator():
async for page in self.pages:
for response in page.prediction_api_key_registrations:
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.recommendationengine_v1beta1.types import prediction_service
@@ -74,14 +74,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

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

@@ -136,7 +136,7 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
async def pages(self) -> AsyncIterable[prediction_service.PredictResponse]:
async def pages(self) -> AsyncIterator[prediction_service.PredictResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
@@ -145,7 +145,7 @@ async def pages(self) -> AsyncIterable[prediction_service.PredictResponse]:

def __aiter__(
self,
) -> AsyncIterable[prediction_service.PredictResponse.PredictionResult]:
) -> AsyncIterator[prediction_service.PredictResponse.PredictionResult]:
async def async_generator():
async for page in self.pages:
for response in page.results:
@@ -15,13 +15,13 @@
#
from typing import (
Any,
AsyncIterable,
AsyncIterator,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
Iterator,
)

from google.cloud.recommendationengine_v1beta1.types import user_event
@@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[user_event_service.ListUserEventsResponse]:
def pages(self) -> Iterator[user_event_service.ListUserEventsResponse]:
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[user_event.UserEvent]:
def __iter__(self) -> Iterator[user_event.UserEvent]:
for page in self.pages:
yield from page.user_events

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

@property
async def pages(self) -> AsyncIterable[user_event_service.ListUserEventsResponse]:
async def pages(self) -> AsyncIterator[user_event_service.ListUserEventsResponse]:
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[user_event.UserEvent]:
def __aiter__(self) -> AsyncIterator[user_event.UserEvent]:
async def async_generator():
async for page in self.pages:
for response in page.user_events:

0 comments on commit 2d73287

Please sign in to comment.