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

Commit

Permalink
chore: use gapic-generator-python 0.52.0 (#224)
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: googleapis/googleapis-gen@290e883
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjkwZTg4MzU0NWUzYWM5ZmYyYmQwMGNkMGRhY2IyOGYxYjhjYTk0NSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 30, 2021
1 parent 77980ff commit 4a8b823
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 66 deletions.
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.monitoring_v3.types import alert
Expand Down Expand Up @@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[alert_service.ListAlertPoliciesResponse]:
def pages(self) -> Iterator[alert_service.ListAlertPoliciesResponse]:
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[alert.AlertPolicy]:
def __iter__(self) -> Iterator[alert.AlertPolicy]:
for page in self.pages:
yield from page.alert_policies

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[alert_service.ListAlertPoliciesResponse]:
async def pages(self) -> AsyncIterator[alert_service.ListAlertPoliciesResponse]:
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[alert.AlertPolicy]:
def __aiter__(self) -> AsyncIterator[alert.AlertPolicy]:
async def async_generator():
async for page in self.pages:
for response in page.alert_policies:
Expand Down
20 changes: 10 additions & 10 deletions google/cloud/monitoring_v3/services/group_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.api import monitored_resource_pb2 # type: ignore
Expand Down Expand Up @@ -76,14 +76,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[group_service.ListGroupsResponse]:
def pages(self) -> Iterator[group_service.ListGroupsResponse]:
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[group.Group]:
def __iter__(self) -> Iterator[group.Group]:
for page in self.pages:
yield from page.group

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

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

@property
def pages(self) -> Iterable[group_service.ListGroupMembersResponse]:
def pages(self) -> Iterator[group_service.ListGroupMembersResponse]:
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[monitored_resource_pb2.MonitoredResource]:
def __iter__(self) -> Iterator[monitored_resource_pb2.MonitoredResource]:
for page in self.pages:
yield from page.members

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

@property
async def pages(self) -> AsyncIterable[group_service.ListGroupMembersResponse]:
async def pages(self) -> AsyncIterator[group_service.ListGroupMembersResponse]:
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[monitored_resource_pb2.MonitoredResource]:
def __aiter__(self) -> AsyncIterator[monitored_resource_pb2.MonitoredResource]:
async def async_generator():
async for page in self.pages:
for response in page.members:
Expand Down
28 changes: 14 additions & 14 deletions google/cloud/monitoring_v3/services/metric_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.api import metric_pb2 # type: ignore
Expand Down Expand Up @@ -79,14 +79,14 @@ def __getattr__(self, name: str) -> Any:
@property
def pages(
self,
) -> Iterable[metric_service.ListMonitoredResourceDescriptorsResponse]:
) -> Iterator[metric_service.ListMonitoredResourceDescriptorsResponse]:
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[monitored_resource_pb2.MonitoredResourceDescriptor]:
def __iter__(self) -> Iterator[monitored_resource_pb2.MonitoredResourceDescriptor]:
for page in self.pages:
yield from page.resource_descriptors

Expand Down Expand Up @@ -145,7 +145,7 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[metric_service.ListMonitoredResourceDescriptorsResponse]:
) -> AsyncIterator[metric_service.ListMonitoredResourceDescriptorsResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
Expand All @@ -154,7 +154,7 @@ async def pages(

def __aiter__(
self,
) -> AsyncIterable[monitored_resource_pb2.MonitoredResourceDescriptor]:
) -> AsyncIterator[monitored_resource_pb2.MonitoredResourceDescriptor]:
async def async_generator():
async for page in self.pages:
for response in page.resource_descriptors:
Expand Down Expand Up @@ -213,14 +213,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[metric_service.ListMetricDescriptorsResponse]:
def pages(self) -> Iterator[metric_service.ListMetricDescriptorsResponse]:
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[metric_pb2.MetricDescriptor]:
def __iter__(self) -> Iterator[metric_pb2.MetricDescriptor]:
for page in self.pages:
yield from page.metric_descriptors

Expand Down Expand Up @@ -277,14 +277,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[metric_service.ListMetricDescriptorsResponse]:
) -> AsyncIterator[metric_service.ListMetricDescriptorsResponse]:
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[metric_pb2.MetricDescriptor]:
def __aiter__(self) -> AsyncIterator[metric_pb2.MetricDescriptor]:
async def async_generator():
async for page in self.pages:
for response in page.metric_descriptors:
Expand Down Expand Up @@ -343,14 +343,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[metric_service.ListTimeSeriesResponse]:
def pages(self) -> Iterator[metric_service.ListTimeSeriesResponse]:
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[gm_metric.TimeSeries]:
def __iter__(self) -> Iterator[gm_metric.TimeSeries]:
for page in self.pages:
yield from page.time_series

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

@property
async def pages(self) -> AsyncIterable[metric_service.ListTimeSeriesResponse]:
async def pages(self) -> AsyncIterator[metric_service.ListTimeSeriesResponse]:
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[gm_metric.TimeSeries]:
def __aiter__(self) -> AsyncIterator[gm_metric.TimeSeries]:
async def async_generator():
async for page in self.pages:
for response in page.time_series:
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.monitoring_v3.types import notification
Expand Down Expand Up @@ -81,14 +81,14 @@ def __getattr__(self, name: str) -> Any:
@property
def pages(
self,
) -> Iterable[notification_service.ListNotificationChannelDescriptorsResponse]:
) -> Iterator[notification_service.ListNotificationChannelDescriptorsResponse]:
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[notification.NotificationChannelDescriptor]:
def __iter__(self) -> Iterator[notification.NotificationChannelDescriptor]:
for page in self.pages:
yield from page.channel_descriptors

Expand Down Expand Up @@ -150,14 +150,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[notification_service.ListNotificationChannelDescriptorsResponse]:
) -> AsyncIterator[notification_service.ListNotificationChannelDescriptorsResponse]:
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[notification.NotificationChannelDescriptor]:
def __aiter__(self) -> AsyncIterator[notification.NotificationChannelDescriptor]:
async def async_generator():
async for page in self.pages:
for response in page.channel_descriptors:
Expand Down Expand Up @@ -216,14 +216,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[notification_service.ListNotificationChannelsResponse]:
def pages(self) -> Iterator[notification_service.ListNotificationChannelsResponse]:
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[notification.NotificationChannel]:
def __iter__(self) -> Iterator[notification.NotificationChannel]:
for page in self.pages:
yield from page.notification_channels

Expand Down Expand Up @@ -282,14 +282,14 @@ def __getattr__(self, name: str) -> Any:
@property
async def pages(
self,
) -> AsyncIterable[notification_service.ListNotificationChannelsResponse]:
) -> AsyncIterator[notification_service.ListNotificationChannelsResponse]:
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[notification.NotificationChannel]:
def __aiter__(self) -> AsyncIterator[notification.NotificationChannel]:
async def async_generator():
async for page in self.pages:
for response in page.notification_channels:
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/monitoring_v3/services/query_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.monitoring_v3.types import metric
Expand Down Expand Up @@ -75,14 +75,14 @@ def __getattr__(self, name: str) -> Any:
return getattr(self._response, name)

@property
def pages(self) -> Iterable[metric_service.QueryTimeSeriesResponse]:
def pages(self) -> Iterator[metric_service.QueryTimeSeriesResponse]:
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[metric.TimeSeriesData]:
def __iter__(self) -> Iterator[metric.TimeSeriesData]:
for page in self.pages:
yield from page.time_series_data

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[metric_service.QueryTimeSeriesResponse]:
async def pages(self) -> AsyncIterator[metric_service.QueryTimeSeriesResponse]:
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[metric.TimeSeriesData]:
def __aiter__(self) -> AsyncIterator[metric.TimeSeriesData]:
async def async_generator():
async for page in self.pages:
for response in page.time_series_data:
Expand Down

0 comments on commit 4a8b823

Please sign in to comment.