google-analytics-admin 0.23.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. google/analytics/admin/__init__.py +615 -0
  2. google/analytics/admin/gapic_version.py +16 -0
  3. google/analytics/admin/py.typed +2 -0
  4. google/analytics/admin_v1alpha/__init__.py +613 -0
  5. google/analytics/admin_v1alpha/gapic_metadata.json +2278 -0
  6. google/analytics/admin_v1alpha/gapic_version.py +16 -0
  7. google/analytics/admin_v1alpha/py.typed +2 -0
  8. google/analytics/admin_v1alpha/services/__init__.py +15 -0
  9. google/analytics/admin_v1alpha/services/analytics_admin_service/__init__.py +22 -0
  10. google/analytics/admin_v1alpha/services/analytics_admin_service/async_client.py +14122 -0
  11. google/analytics/admin_v1alpha/services/analytics_admin_service/client.py +14680 -0
  12. google/analytics/admin_v1alpha/services/analytics_admin_service/pagers.py +4337 -0
  13. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/__init__.py +41 -0
  14. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/base.py +2494 -0
  15. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/grpc.py +4797 -0
  16. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/grpc_asyncio.py +5671 -0
  17. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/rest.py +31875 -0
  18. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/rest_base.py +7944 -0
  19. google/analytics/admin_v1alpha/types/__init__.py +602 -0
  20. google/analytics/admin_v1alpha/types/access_report.py +705 -0
  21. google/analytics/admin_v1alpha/types/analytics_admin.py +4997 -0
  22. google/analytics/admin_v1alpha/types/audience.py +781 -0
  23. google/analytics/admin_v1alpha/types/channel_group.py +309 -0
  24. google/analytics/admin_v1alpha/types/event_create_and_edit.py +298 -0
  25. google/analytics/admin_v1alpha/types/expanded_data_set.py +282 -0
  26. google/analytics/admin_v1alpha/types/resources.py +3289 -0
  27. google/analytics/admin_v1alpha/types/subproperty_event_filter.py +292 -0
  28. google/analytics/admin_v1beta/__init__.py +255 -0
  29. google/analytics/admin_v1beta/gapic_metadata.json +838 -0
  30. google/analytics/admin_v1beta/gapic_version.py +16 -0
  31. google/analytics/admin_v1beta/py.typed +2 -0
  32. google/analytics/admin_v1beta/services/__init__.py +15 -0
  33. google/analytics/admin_v1beta/services/analytics_admin_service/__init__.py +22 -0
  34. google/analytics/admin_v1beta/services/analytics_admin_service/async_client.py +6707 -0
  35. google/analytics/admin_v1beta/services/analytics_admin_service/client.py +7164 -0
  36. google/analytics/admin_v1beta/services/analytics_admin_service/pagers.py +1927 -0
  37. google/analytics/admin_v1beta/services/analytics_admin_service/transports/__init__.py +41 -0
  38. google/analytics/admin_v1beta/services/analytics_admin_service/transports/base.py +965 -0
  39. google/analytics/admin_v1beta/services/analytics_admin_service/transports/grpc.py +1917 -0
  40. google/analytics/admin_v1beta/services/analytics_admin_service/transports/grpc_asyncio.py +2251 -0
  41. google/analytics/admin_v1beta/services/analytics_admin_service/transports/rest.py +11423 -0
  42. google/analytics/admin_v1beta/services/analytics_admin_service/transports/rest_base.py +2857 -0
  43. google/analytics/admin_v1beta/types/__init__.py +244 -0
  44. google/analytics/admin_v1beta/types/access_report.py +705 -0
  45. google/analytics/admin_v1beta/types/analytics_admin.py +2006 -0
  46. google/analytics/admin_v1beta/types/resources.py +1677 -0
  47. google_analytics_admin-0.23.6.dist-info/LICENSE +202 -0
  48. google_analytics_admin-0.23.6.dist-info/METADATA +228 -0
  49. google_analytics_admin-0.23.6.dist-info/RECORD +51 -0
  50. google_analytics_admin-0.23.6.dist-info/WHEEL +5 -0
  51. google_analytics_admin-0.23.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1927 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from typing import (
17
+ Any,
18
+ AsyncIterator,
19
+ Awaitable,
20
+ Callable,
21
+ Iterator,
22
+ Optional,
23
+ Sequence,
24
+ Tuple,
25
+ Union,
26
+ )
27
+
28
+ from google.api_core import gapic_v1
29
+ from google.api_core import retry as retries
30
+ from google.api_core import retry_async as retries_async
31
+
32
+ try:
33
+ OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
34
+ OptionalAsyncRetry = Union[
35
+ retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None
36
+ ]
37
+ except AttributeError: # pragma: NO COVER
38
+ OptionalRetry = Union[retries.Retry, object, None] # type: ignore
39
+ OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore
40
+
41
+ from google.analytics.admin_v1beta.types import analytics_admin, resources
42
+
43
+
44
+ class ListAccountsPager:
45
+ """A pager for iterating through ``list_accounts`` requests.
46
+
47
+ This class thinly wraps an initial
48
+ :class:`google.analytics.admin_v1beta.types.ListAccountsResponse` object, and
49
+ provides an ``__iter__`` method to iterate through its
50
+ ``accounts`` field.
51
+
52
+ If there are more pages, the ``__iter__`` method will make additional
53
+ ``ListAccounts`` requests and continue to iterate
54
+ through the ``accounts`` field on the
55
+ corresponding responses.
56
+
57
+ All the usual :class:`google.analytics.admin_v1beta.types.ListAccountsResponse`
58
+ attributes are available on the pager. If multiple requests are made, only
59
+ the most recent response is retained, and thus used for attribute lookup.
60
+ """
61
+
62
+ def __init__(
63
+ self,
64
+ method: Callable[..., analytics_admin.ListAccountsResponse],
65
+ request: analytics_admin.ListAccountsRequest,
66
+ response: analytics_admin.ListAccountsResponse,
67
+ *,
68
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
69
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
70
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
71
+ ):
72
+ """Instantiate the pager.
73
+
74
+ Args:
75
+ method (Callable): The method that was originally called, and
76
+ which instantiated this pager.
77
+ request (google.analytics.admin_v1beta.types.ListAccountsRequest):
78
+ The initial request object.
79
+ response (google.analytics.admin_v1beta.types.ListAccountsResponse):
80
+ The initial response object.
81
+ retry (google.api_core.retry.Retry): Designation of what errors,
82
+ if any, should be retried.
83
+ timeout (float): The timeout for this request.
84
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
85
+ sent along with the request as metadata. Normally, each value must be of type `str`,
86
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
87
+ be of type `bytes`.
88
+ """
89
+ self._method = method
90
+ self._request = analytics_admin.ListAccountsRequest(request)
91
+ self._response = response
92
+ self._retry = retry
93
+ self._timeout = timeout
94
+ self._metadata = metadata
95
+
96
+ def __getattr__(self, name: str) -> Any:
97
+ return getattr(self._response, name)
98
+
99
+ @property
100
+ def pages(self) -> Iterator[analytics_admin.ListAccountsResponse]:
101
+ yield self._response
102
+ while self._response.next_page_token:
103
+ self._request.page_token = self._response.next_page_token
104
+ self._response = self._method(
105
+ self._request,
106
+ retry=self._retry,
107
+ timeout=self._timeout,
108
+ metadata=self._metadata,
109
+ )
110
+ yield self._response
111
+
112
+ def __iter__(self) -> Iterator[resources.Account]:
113
+ for page in self.pages:
114
+ yield from page.accounts
115
+
116
+ def __repr__(self) -> str:
117
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
118
+
119
+
120
+ class ListAccountsAsyncPager:
121
+ """A pager for iterating through ``list_accounts`` requests.
122
+
123
+ This class thinly wraps an initial
124
+ :class:`google.analytics.admin_v1beta.types.ListAccountsResponse` object, and
125
+ provides an ``__aiter__`` method to iterate through its
126
+ ``accounts`` field.
127
+
128
+ If there are more pages, the ``__aiter__`` method will make additional
129
+ ``ListAccounts`` requests and continue to iterate
130
+ through the ``accounts`` field on the
131
+ corresponding responses.
132
+
133
+ All the usual :class:`google.analytics.admin_v1beta.types.ListAccountsResponse`
134
+ attributes are available on the pager. If multiple requests are made, only
135
+ the most recent response is retained, and thus used for attribute lookup.
136
+ """
137
+
138
+ def __init__(
139
+ self,
140
+ method: Callable[..., Awaitable[analytics_admin.ListAccountsResponse]],
141
+ request: analytics_admin.ListAccountsRequest,
142
+ response: analytics_admin.ListAccountsResponse,
143
+ *,
144
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
145
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
146
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
147
+ ):
148
+ """Instantiates the pager.
149
+
150
+ Args:
151
+ method (Callable): The method that was originally called, and
152
+ which instantiated this pager.
153
+ request (google.analytics.admin_v1beta.types.ListAccountsRequest):
154
+ The initial request object.
155
+ response (google.analytics.admin_v1beta.types.ListAccountsResponse):
156
+ The initial response object.
157
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
158
+ if any, should be retried.
159
+ timeout (float): The timeout for this request.
160
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
161
+ sent along with the request as metadata. Normally, each value must be of type `str`,
162
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
163
+ be of type `bytes`.
164
+ """
165
+ self._method = method
166
+ self._request = analytics_admin.ListAccountsRequest(request)
167
+ self._response = response
168
+ self._retry = retry
169
+ self._timeout = timeout
170
+ self._metadata = metadata
171
+
172
+ def __getattr__(self, name: str) -> Any:
173
+ return getattr(self._response, name)
174
+
175
+ @property
176
+ async def pages(self) -> AsyncIterator[analytics_admin.ListAccountsResponse]:
177
+ yield self._response
178
+ while self._response.next_page_token:
179
+ self._request.page_token = self._response.next_page_token
180
+ self._response = await self._method(
181
+ self._request,
182
+ retry=self._retry,
183
+ timeout=self._timeout,
184
+ metadata=self._metadata,
185
+ )
186
+ yield self._response
187
+
188
+ def __aiter__(self) -> AsyncIterator[resources.Account]:
189
+ async def async_generator():
190
+ async for page in self.pages:
191
+ for response in page.accounts:
192
+ yield response
193
+
194
+ return async_generator()
195
+
196
+ def __repr__(self) -> str:
197
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
198
+
199
+
200
+ class ListAccountSummariesPager:
201
+ """A pager for iterating through ``list_account_summaries`` requests.
202
+
203
+ This class thinly wraps an initial
204
+ :class:`google.analytics.admin_v1beta.types.ListAccountSummariesResponse` object, and
205
+ provides an ``__iter__`` method to iterate through its
206
+ ``account_summaries`` field.
207
+
208
+ If there are more pages, the ``__iter__`` method will make additional
209
+ ``ListAccountSummaries`` requests and continue to iterate
210
+ through the ``account_summaries`` field on the
211
+ corresponding responses.
212
+
213
+ All the usual :class:`google.analytics.admin_v1beta.types.ListAccountSummariesResponse`
214
+ attributes are available on the pager. If multiple requests are made, only
215
+ the most recent response is retained, and thus used for attribute lookup.
216
+ """
217
+
218
+ def __init__(
219
+ self,
220
+ method: Callable[..., analytics_admin.ListAccountSummariesResponse],
221
+ request: analytics_admin.ListAccountSummariesRequest,
222
+ response: analytics_admin.ListAccountSummariesResponse,
223
+ *,
224
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
225
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
226
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
227
+ ):
228
+ """Instantiate the pager.
229
+
230
+ Args:
231
+ method (Callable): The method that was originally called, and
232
+ which instantiated this pager.
233
+ request (google.analytics.admin_v1beta.types.ListAccountSummariesRequest):
234
+ The initial request object.
235
+ response (google.analytics.admin_v1beta.types.ListAccountSummariesResponse):
236
+ The initial response object.
237
+ retry (google.api_core.retry.Retry): Designation of what errors,
238
+ if any, should be retried.
239
+ timeout (float): The timeout for this request.
240
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
241
+ sent along with the request as metadata. Normally, each value must be of type `str`,
242
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
243
+ be of type `bytes`.
244
+ """
245
+ self._method = method
246
+ self._request = analytics_admin.ListAccountSummariesRequest(request)
247
+ self._response = response
248
+ self._retry = retry
249
+ self._timeout = timeout
250
+ self._metadata = metadata
251
+
252
+ def __getattr__(self, name: str) -> Any:
253
+ return getattr(self._response, name)
254
+
255
+ @property
256
+ def pages(self) -> Iterator[analytics_admin.ListAccountSummariesResponse]:
257
+ yield self._response
258
+ while self._response.next_page_token:
259
+ self._request.page_token = self._response.next_page_token
260
+ self._response = self._method(
261
+ self._request,
262
+ retry=self._retry,
263
+ timeout=self._timeout,
264
+ metadata=self._metadata,
265
+ )
266
+ yield self._response
267
+
268
+ def __iter__(self) -> Iterator[resources.AccountSummary]:
269
+ for page in self.pages:
270
+ yield from page.account_summaries
271
+
272
+ def __repr__(self) -> str:
273
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
274
+
275
+
276
+ class ListAccountSummariesAsyncPager:
277
+ """A pager for iterating through ``list_account_summaries`` requests.
278
+
279
+ This class thinly wraps an initial
280
+ :class:`google.analytics.admin_v1beta.types.ListAccountSummariesResponse` object, and
281
+ provides an ``__aiter__`` method to iterate through its
282
+ ``account_summaries`` field.
283
+
284
+ If there are more pages, the ``__aiter__`` method will make additional
285
+ ``ListAccountSummaries`` requests and continue to iterate
286
+ through the ``account_summaries`` field on the
287
+ corresponding responses.
288
+
289
+ All the usual :class:`google.analytics.admin_v1beta.types.ListAccountSummariesResponse`
290
+ attributes are available on the pager. If multiple requests are made, only
291
+ the most recent response is retained, and thus used for attribute lookup.
292
+ """
293
+
294
+ def __init__(
295
+ self,
296
+ method: Callable[..., Awaitable[analytics_admin.ListAccountSummariesResponse]],
297
+ request: analytics_admin.ListAccountSummariesRequest,
298
+ response: analytics_admin.ListAccountSummariesResponse,
299
+ *,
300
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
301
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
302
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
303
+ ):
304
+ """Instantiates the pager.
305
+
306
+ Args:
307
+ method (Callable): The method that was originally called, and
308
+ which instantiated this pager.
309
+ request (google.analytics.admin_v1beta.types.ListAccountSummariesRequest):
310
+ The initial request object.
311
+ response (google.analytics.admin_v1beta.types.ListAccountSummariesResponse):
312
+ The initial response object.
313
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
314
+ if any, should be retried.
315
+ timeout (float): The timeout for this request.
316
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
317
+ sent along with the request as metadata. Normally, each value must be of type `str`,
318
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
319
+ be of type `bytes`.
320
+ """
321
+ self._method = method
322
+ self._request = analytics_admin.ListAccountSummariesRequest(request)
323
+ self._response = response
324
+ self._retry = retry
325
+ self._timeout = timeout
326
+ self._metadata = metadata
327
+
328
+ def __getattr__(self, name: str) -> Any:
329
+ return getattr(self._response, name)
330
+
331
+ @property
332
+ async def pages(
333
+ self,
334
+ ) -> AsyncIterator[analytics_admin.ListAccountSummariesResponse]:
335
+ yield self._response
336
+ while self._response.next_page_token:
337
+ self._request.page_token = self._response.next_page_token
338
+ self._response = await self._method(
339
+ self._request,
340
+ retry=self._retry,
341
+ timeout=self._timeout,
342
+ metadata=self._metadata,
343
+ )
344
+ yield self._response
345
+
346
+ def __aiter__(self) -> AsyncIterator[resources.AccountSummary]:
347
+ async def async_generator():
348
+ async for page in self.pages:
349
+ for response in page.account_summaries:
350
+ yield response
351
+
352
+ return async_generator()
353
+
354
+ def __repr__(self) -> str:
355
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
356
+
357
+
358
+ class ListPropertiesPager:
359
+ """A pager for iterating through ``list_properties`` requests.
360
+
361
+ This class thinly wraps an initial
362
+ :class:`google.analytics.admin_v1beta.types.ListPropertiesResponse` object, and
363
+ provides an ``__iter__`` method to iterate through its
364
+ ``properties`` field.
365
+
366
+ If there are more pages, the ``__iter__`` method will make additional
367
+ ``ListProperties`` requests and continue to iterate
368
+ through the ``properties`` field on the
369
+ corresponding responses.
370
+
371
+ All the usual :class:`google.analytics.admin_v1beta.types.ListPropertiesResponse`
372
+ attributes are available on the pager. If multiple requests are made, only
373
+ the most recent response is retained, and thus used for attribute lookup.
374
+ """
375
+
376
+ def __init__(
377
+ self,
378
+ method: Callable[..., analytics_admin.ListPropertiesResponse],
379
+ request: analytics_admin.ListPropertiesRequest,
380
+ response: analytics_admin.ListPropertiesResponse,
381
+ *,
382
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
383
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
384
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
385
+ ):
386
+ """Instantiate the pager.
387
+
388
+ Args:
389
+ method (Callable): The method that was originally called, and
390
+ which instantiated this pager.
391
+ request (google.analytics.admin_v1beta.types.ListPropertiesRequest):
392
+ The initial request object.
393
+ response (google.analytics.admin_v1beta.types.ListPropertiesResponse):
394
+ The initial response object.
395
+ retry (google.api_core.retry.Retry): Designation of what errors,
396
+ if any, should be retried.
397
+ timeout (float): The timeout for this request.
398
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
399
+ sent along with the request as metadata. Normally, each value must be of type `str`,
400
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
401
+ be of type `bytes`.
402
+ """
403
+ self._method = method
404
+ self._request = analytics_admin.ListPropertiesRequest(request)
405
+ self._response = response
406
+ self._retry = retry
407
+ self._timeout = timeout
408
+ self._metadata = metadata
409
+
410
+ def __getattr__(self, name: str) -> Any:
411
+ return getattr(self._response, name)
412
+
413
+ @property
414
+ def pages(self) -> Iterator[analytics_admin.ListPropertiesResponse]:
415
+ yield self._response
416
+ while self._response.next_page_token:
417
+ self._request.page_token = self._response.next_page_token
418
+ self._response = self._method(
419
+ self._request,
420
+ retry=self._retry,
421
+ timeout=self._timeout,
422
+ metadata=self._metadata,
423
+ )
424
+ yield self._response
425
+
426
+ def __iter__(self) -> Iterator[resources.Property]:
427
+ for page in self.pages:
428
+ yield from page.properties
429
+
430
+ def __repr__(self) -> str:
431
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
432
+
433
+
434
+ class ListPropertiesAsyncPager:
435
+ """A pager for iterating through ``list_properties`` requests.
436
+
437
+ This class thinly wraps an initial
438
+ :class:`google.analytics.admin_v1beta.types.ListPropertiesResponse` object, and
439
+ provides an ``__aiter__`` method to iterate through its
440
+ ``properties`` field.
441
+
442
+ If there are more pages, the ``__aiter__`` method will make additional
443
+ ``ListProperties`` requests and continue to iterate
444
+ through the ``properties`` field on the
445
+ corresponding responses.
446
+
447
+ All the usual :class:`google.analytics.admin_v1beta.types.ListPropertiesResponse`
448
+ attributes are available on the pager. If multiple requests are made, only
449
+ the most recent response is retained, and thus used for attribute lookup.
450
+ """
451
+
452
+ def __init__(
453
+ self,
454
+ method: Callable[..., Awaitable[analytics_admin.ListPropertiesResponse]],
455
+ request: analytics_admin.ListPropertiesRequest,
456
+ response: analytics_admin.ListPropertiesResponse,
457
+ *,
458
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
459
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
460
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
461
+ ):
462
+ """Instantiates the pager.
463
+
464
+ Args:
465
+ method (Callable): The method that was originally called, and
466
+ which instantiated this pager.
467
+ request (google.analytics.admin_v1beta.types.ListPropertiesRequest):
468
+ The initial request object.
469
+ response (google.analytics.admin_v1beta.types.ListPropertiesResponse):
470
+ The initial response object.
471
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
472
+ if any, should be retried.
473
+ timeout (float): The timeout for this request.
474
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
475
+ sent along with the request as metadata. Normally, each value must be of type `str`,
476
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
477
+ be of type `bytes`.
478
+ """
479
+ self._method = method
480
+ self._request = analytics_admin.ListPropertiesRequest(request)
481
+ self._response = response
482
+ self._retry = retry
483
+ self._timeout = timeout
484
+ self._metadata = metadata
485
+
486
+ def __getattr__(self, name: str) -> Any:
487
+ return getattr(self._response, name)
488
+
489
+ @property
490
+ async def pages(self) -> AsyncIterator[analytics_admin.ListPropertiesResponse]:
491
+ yield self._response
492
+ while self._response.next_page_token:
493
+ self._request.page_token = self._response.next_page_token
494
+ self._response = await self._method(
495
+ self._request,
496
+ retry=self._retry,
497
+ timeout=self._timeout,
498
+ metadata=self._metadata,
499
+ )
500
+ yield self._response
501
+
502
+ def __aiter__(self) -> AsyncIterator[resources.Property]:
503
+ async def async_generator():
504
+ async for page in self.pages:
505
+ for response in page.properties:
506
+ yield response
507
+
508
+ return async_generator()
509
+
510
+ def __repr__(self) -> str:
511
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
512
+
513
+
514
+ class ListFirebaseLinksPager:
515
+ """A pager for iterating through ``list_firebase_links`` requests.
516
+
517
+ This class thinly wraps an initial
518
+ :class:`google.analytics.admin_v1beta.types.ListFirebaseLinksResponse` object, and
519
+ provides an ``__iter__`` method to iterate through its
520
+ ``firebase_links`` field.
521
+
522
+ If there are more pages, the ``__iter__`` method will make additional
523
+ ``ListFirebaseLinks`` requests and continue to iterate
524
+ through the ``firebase_links`` field on the
525
+ corresponding responses.
526
+
527
+ All the usual :class:`google.analytics.admin_v1beta.types.ListFirebaseLinksResponse`
528
+ attributes are available on the pager. If multiple requests are made, only
529
+ the most recent response is retained, and thus used for attribute lookup.
530
+ """
531
+
532
+ def __init__(
533
+ self,
534
+ method: Callable[..., analytics_admin.ListFirebaseLinksResponse],
535
+ request: analytics_admin.ListFirebaseLinksRequest,
536
+ response: analytics_admin.ListFirebaseLinksResponse,
537
+ *,
538
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
539
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
540
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
541
+ ):
542
+ """Instantiate the pager.
543
+
544
+ Args:
545
+ method (Callable): The method that was originally called, and
546
+ which instantiated this pager.
547
+ request (google.analytics.admin_v1beta.types.ListFirebaseLinksRequest):
548
+ The initial request object.
549
+ response (google.analytics.admin_v1beta.types.ListFirebaseLinksResponse):
550
+ The initial response object.
551
+ retry (google.api_core.retry.Retry): Designation of what errors,
552
+ if any, should be retried.
553
+ timeout (float): The timeout for this request.
554
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
555
+ sent along with the request as metadata. Normally, each value must be of type `str`,
556
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
557
+ be of type `bytes`.
558
+ """
559
+ self._method = method
560
+ self._request = analytics_admin.ListFirebaseLinksRequest(request)
561
+ self._response = response
562
+ self._retry = retry
563
+ self._timeout = timeout
564
+ self._metadata = metadata
565
+
566
+ def __getattr__(self, name: str) -> Any:
567
+ return getattr(self._response, name)
568
+
569
+ @property
570
+ def pages(self) -> Iterator[analytics_admin.ListFirebaseLinksResponse]:
571
+ yield self._response
572
+ while self._response.next_page_token:
573
+ self._request.page_token = self._response.next_page_token
574
+ self._response = self._method(
575
+ self._request,
576
+ retry=self._retry,
577
+ timeout=self._timeout,
578
+ metadata=self._metadata,
579
+ )
580
+ yield self._response
581
+
582
+ def __iter__(self) -> Iterator[resources.FirebaseLink]:
583
+ for page in self.pages:
584
+ yield from page.firebase_links
585
+
586
+ def __repr__(self) -> str:
587
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
588
+
589
+
590
+ class ListFirebaseLinksAsyncPager:
591
+ """A pager for iterating through ``list_firebase_links`` requests.
592
+
593
+ This class thinly wraps an initial
594
+ :class:`google.analytics.admin_v1beta.types.ListFirebaseLinksResponse` object, and
595
+ provides an ``__aiter__`` method to iterate through its
596
+ ``firebase_links`` field.
597
+
598
+ If there are more pages, the ``__aiter__`` method will make additional
599
+ ``ListFirebaseLinks`` requests and continue to iterate
600
+ through the ``firebase_links`` field on the
601
+ corresponding responses.
602
+
603
+ All the usual :class:`google.analytics.admin_v1beta.types.ListFirebaseLinksResponse`
604
+ attributes are available on the pager. If multiple requests are made, only
605
+ the most recent response is retained, and thus used for attribute lookup.
606
+ """
607
+
608
+ def __init__(
609
+ self,
610
+ method: Callable[..., Awaitable[analytics_admin.ListFirebaseLinksResponse]],
611
+ request: analytics_admin.ListFirebaseLinksRequest,
612
+ response: analytics_admin.ListFirebaseLinksResponse,
613
+ *,
614
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
615
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
616
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
617
+ ):
618
+ """Instantiates the pager.
619
+
620
+ Args:
621
+ method (Callable): The method that was originally called, and
622
+ which instantiated this pager.
623
+ request (google.analytics.admin_v1beta.types.ListFirebaseLinksRequest):
624
+ The initial request object.
625
+ response (google.analytics.admin_v1beta.types.ListFirebaseLinksResponse):
626
+ The initial response object.
627
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
628
+ if any, should be retried.
629
+ timeout (float): The timeout for this request.
630
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
631
+ sent along with the request as metadata. Normally, each value must be of type `str`,
632
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
633
+ be of type `bytes`.
634
+ """
635
+ self._method = method
636
+ self._request = analytics_admin.ListFirebaseLinksRequest(request)
637
+ self._response = response
638
+ self._retry = retry
639
+ self._timeout = timeout
640
+ self._metadata = metadata
641
+
642
+ def __getattr__(self, name: str) -> Any:
643
+ return getattr(self._response, name)
644
+
645
+ @property
646
+ async def pages(self) -> AsyncIterator[analytics_admin.ListFirebaseLinksResponse]:
647
+ yield self._response
648
+ while self._response.next_page_token:
649
+ self._request.page_token = self._response.next_page_token
650
+ self._response = await self._method(
651
+ self._request,
652
+ retry=self._retry,
653
+ timeout=self._timeout,
654
+ metadata=self._metadata,
655
+ )
656
+ yield self._response
657
+
658
+ def __aiter__(self) -> AsyncIterator[resources.FirebaseLink]:
659
+ async def async_generator():
660
+ async for page in self.pages:
661
+ for response in page.firebase_links:
662
+ yield response
663
+
664
+ return async_generator()
665
+
666
+ def __repr__(self) -> str:
667
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
668
+
669
+
670
+ class ListGoogleAdsLinksPager:
671
+ """A pager for iterating through ``list_google_ads_links`` requests.
672
+
673
+ This class thinly wraps an initial
674
+ :class:`google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse` object, and
675
+ provides an ``__iter__`` method to iterate through its
676
+ ``google_ads_links`` field.
677
+
678
+ If there are more pages, the ``__iter__`` method will make additional
679
+ ``ListGoogleAdsLinks`` requests and continue to iterate
680
+ through the ``google_ads_links`` field on the
681
+ corresponding responses.
682
+
683
+ All the usual :class:`google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse`
684
+ attributes are available on the pager. If multiple requests are made, only
685
+ the most recent response is retained, and thus used for attribute lookup.
686
+ """
687
+
688
+ def __init__(
689
+ self,
690
+ method: Callable[..., analytics_admin.ListGoogleAdsLinksResponse],
691
+ request: analytics_admin.ListGoogleAdsLinksRequest,
692
+ response: analytics_admin.ListGoogleAdsLinksResponse,
693
+ *,
694
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
695
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
696
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
697
+ ):
698
+ """Instantiate the pager.
699
+
700
+ Args:
701
+ method (Callable): The method that was originally called, and
702
+ which instantiated this pager.
703
+ request (google.analytics.admin_v1beta.types.ListGoogleAdsLinksRequest):
704
+ The initial request object.
705
+ response (google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse):
706
+ The initial response object.
707
+ retry (google.api_core.retry.Retry): Designation of what errors,
708
+ if any, should be retried.
709
+ timeout (float): The timeout for this request.
710
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
711
+ sent along with the request as metadata. Normally, each value must be of type `str`,
712
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
713
+ be of type `bytes`.
714
+ """
715
+ self._method = method
716
+ self._request = analytics_admin.ListGoogleAdsLinksRequest(request)
717
+ self._response = response
718
+ self._retry = retry
719
+ self._timeout = timeout
720
+ self._metadata = metadata
721
+
722
+ def __getattr__(self, name: str) -> Any:
723
+ return getattr(self._response, name)
724
+
725
+ @property
726
+ def pages(self) -> Iterator[analytics_admin.ListGoogleAdsLinksResponse]:
727
+ yield self._response
728
+ while self._response.next_page_token:
729
+ self._request.page_token = self._response.next_page_token
730
+ self._response = self._method(
731
+ self._request,
732
+ retry=self._retry,
733
+ timeout=self._timeout,
734
+ metadata=self._metadata,
735
+ )
736
+ yield self._response
737
+
738
+ def __iter__(self) -> Iterator[resources.GoogleAdsLink]:
739
+ for page in self.pages:
740
+ yield from page.google_ads_links
741
+
742
+ def __repr__(self) -> str:
743
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
744
+
745
+
746
+ class ListGoogleAdsLinksAsyncPager:
747
+ """A pager for iterating through ``list_google_ads_links`` requests.
748
+
749
+ This class thinly wraps an initial
750
+ :class:`google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse` object, and
751
+ provides an ``__aiter__`` method to iterate through its
752
+ ``google_ads_links`` field.
753
+
754
+ If there are more pages, the ``__aiter__`` method will make additional
755
+ ``ListGoogleAdsLinks`` requests and continue to iterate
756
+ through the ``google_ads_links`` field on the
757
+ corresponding responses.
758
+
759
+ All the usual :class:`google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse`
760
+ attributes are available on the pager. If multiple requests are made, only
761
+ the most recent response is retained, and thus used for attribute lookup.
762
+ """
763
+
764
+ def __init__(
765
+ self,
766
+ method: Callable[..., Awaitable[analytics_admin.ListGoogleAdsLinksResponse]],
767
+ request: analytics_admin.ListGoogleAdsLinksRequest,
768
+ response: analytics_admin.ListGoogleAdsLinksResponse,
769
+ *,
770
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
771
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
772
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
773
+ ):
774
+ """Instantiates the pager.
775
+
776
+ Args:
777
+ method (Callable): The method that was originally called, and
778
+ which instantiated this pager.
779
+ request (google.analytics.admin_v1beta.types.ListGoogleAdsLinksRequest):
780
+ The initial request object.
781
+ response (google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse):
782
+ The initial response object.
783
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
784
+ if any, should be retried.
785
+ timeout (float): The timeout for this request.
786
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
787
+ sent along with the request as metadata. Normally, each value must be of type `str`,
788
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
789
+ be of type `bytes`.
790
+ """
791
+ self._method = method
792
+ self._request = analytics_admin.ListGoogleAdsLinksRequest(request)
793
+ self._response = response
794
+ self._retry = retry
795
+ self._timeout = timeout
796
+ self._metadata = metadata
797
+
798
+ def __getattr__(self, name: str) -> Any:
799
+ return getattr(self._response, name)
800
+
801
+ @property
802
+ async def pages(self) -> AsyncIterator[analytics_admin.ListGoogleAdsLinksResponse]:
803
+ yield self._response
804
+ while self._response.next_page_token:
805
+ self._request.page_token = self._response.next_page_token
806
+ self._response = await self._method(
807
+ self._request,
808
+ retry=self._retry,
809
+ timeout=self._timeout,
810
+ metadata=self._metadata,
811
+ )
812
+ yield self._response
813
+
814
+ def __aiter__(self) -> AsyncIterator[resources.GoogleAdsLink]:
815
+ async def async_generator():
816
+ async for page in self.pages:
817
+ for response in page.google_ads_links:
818
+ yield response
819
+
820
+ return async_generator()
821
+
822
+ def __repr__(self) -> str:
823
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
824
+
825
+
826
+ class ListMeasurementProtocolSecretsPager:
827
+ """A pager for iterating through ``list_measurement_protocol_secrets`` requests.
828
+
829
+ This class thinly wraps an initial
830
+ :class:`google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse` object, and
831
+ provides an ``__iter__`` method to iterate through its
832
+ ``measurement_protocol_secrets`` field.
833
+
834
+ If there are more pages, the ``__iter__`` method will make additional
835
+ ``ListMeasurementProtocolSecrets`` requests and continue to iterate
836
+ through the ``measurement_protocol_secrets`` field on the
837
+ corresponding responses.
838
+
839
+ All the usual :class:`google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse`
840
+ attributes are available on the pager. If multiple requests are made, only
841
+ the most recent response is retained, and thus used for attribute lookup.
842
+ """
843
+
844
+ def __init__(
845
+ self,
846
+ method: Callable[..., analytics_admin.ListMeasurementProtocolSecretsResponse],
847
+ request: analytics_admin.ListMeasurementProtocolSecretsRequest,
848
+ response: analytics_admin.ListMeasurementProtocolSecretsResponse,
849
+ *,
850
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
851
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
852
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
853
+ ):
854
+ """Instantiate the pager.
855
+
856
+ Args:
857
+ method (Callable): The method that was originally called, and
858
+ which instantiated this pager.
859
+ request (google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsRequest):
860
+ The initial request object.
861
+ response (google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse):
862
+ The initial response object.
863
+ retry (google.api_core.retry.Retry): Designation of what errors,
864
+ if any, should be retried.
865
+ timeout (float): The timeout for this request.
866
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
867
+ sent along with the request as metadata. Normally, each value must be of type `str`,
868
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
869
+ be of type `bytes`.
870
+ """
871
+ self._method = method
872
+ self._request = analytics_admin.ListMeasurementProtocolSecretsRequest(request)
873
+ self._response = response
874
+ self._retry = retry
875
+ self._timeout = timeout
876
+ self._metadata = metadata
877
+
878
+ def __getattr__(self, name: str) -> Any:
879
+ return getattr(self._response, name)
880
+
881
+ @property
882
+ def pages(self) -> Iterator[analytics_admin.ListMeasurementProtocolSecretsResponse]:
883
+ yield self._response
884
+ while self._response.next_page_token:
885
+ self._request.page_token = self._response.next_page_token
886
+ self._response = self._method(
887
+ self._request,
888
+ retry=self._retry,
889
+ timeout=self._timeout,
890
+ metadata=self._metadata,
891
+ )
892
+ yield self._response
893
+
894
+ def __iter__(self) -> Iterator[resources.MeasurementProtocolSecret]:
895
+ for page in self.pages:
896
+ yield from page.measurement_protocol_secrets
897
+
898
+ def __repr__(self) -> str:
899
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
900
+
901
+
902
+ class ListMeasurementProtocolSecretsAsyncPager:
903
+ """A pager for iterating through ``list_measurement_protocol_secrets`` requests.
904
+
905
+ This class thinly wraps an initial
906
+ :class:`google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse` object, and
907
+ provides an ``__aiter__`` method to iterate through its
908
+ ``measurement_protocol_secrets`` field.
909
+
910
+ If there are more pages, the ``__aiter__`` method will make additional
911
+ ``ListMeasurementProtocolSecrets`` requests and continue to iterate
912
+ through the ``measurement_protocol_secrets`` field on the
913
+ corresponding responses.
914
+
915
+ All the usual :class:`google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse`
916
+ attributes are available on the pager. If multiple requests are made, only
917
+ the most recent response is retained, and thus used for attribute lookup.
918
+ """
919
+
920
+ def __init__(
921
+ self,
922
+ method: Callable[
923
+ ..., Awaitable[analytics_admin.ListMeasurementProtocolSecretsResponse]
924
+ ],
925
+ request: analytics_admin.ListMeasurementProtocolSecretsRequest,
926
+ response: analytics_admin.ListMeasurementProtocolSecretsResponse,
927
+ *,
928
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
929
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
930
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
931
+ ):
932
+ """Instantiates the pager.
933
+
934
+ Args:
935
+ method (Callable): The method that was originally called, and
936
+ which instantiated this pager.
937
+ request (google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsRequest):
938
+ The initial request object.
939
+ response (google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse):
940
+ The initial response object.
941
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
942
+ if any, should be retried.
943
+ timeout (float): The timeout for this request.
944
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
945
+ sent along with the request as metadata. Normally, each value must be of type `str`,
946
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
947
+ be of type `bytes`.
948
+ """
949
+ self._method = method
950
+ self._request = analytics_admin.ListMeasurementProtocolSecretsRequest(request)
951
+ self._response = response
952
+ self._retry = retry
953
+ self._timeout = timeout
954
+ self._metadata = metadata
955
+
956
+ def __getattr__(self, name: str) -> Any:
957
+ return getattr(self._response, name)
958
+
959
+ @property
960
+ async def pages(
961
+ self,
962
+ ) -> AsyncIterator[analytics_admin.ListMeasurementProtocolSecretsResponse]:
963
+ yield self._response
964
+ while self._response.next_page_token:
965
+ self._request.page_token = self._response.next_page_token
966
+ self._response = await self._method(
967
+ self._request,
968
+ retry=self._retry,
969
+ timeout=self._timeout,
970
+ metadata=self._metadata,
971
+ )
972
+ yield self._response
973
+
974
+ def __aiter__(self) -> AsyncIterator[resources.MeasurementProtocolSecret]:
975
+ async def async_generator():
976
+ async for page in self.pages:
977
+ for response in page.measurement_protocol_secrets:
978
+ yield response
979
+
980
+ return async_generator()
981
+
982
+ def __repr__(self) -> str:
983
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
984
+
985
+
986
+ class SearchChangeHistoryEventsPager:
987
+ """A pager for iterating through ``search_change_history_events`` requests.
988
+
989
+ This class thinly wraps an initial
990
+ :class:`google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse` object, and
991
+ provides an ``__iter__`` method to iterate through its
992
+ ``change_history_events`` field.
993
+
994
+ If there are more pages, the ``__iter__`` method will make additional
995
+ ``SearchChangeHistoryEvents`` requests and continue to iterate
996
+ through the ``change_history_events`` field on the
997
+ corresponding responses.
998
+
999
+ All the usual :class:`google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse`
1000
+ attributes are available on the pager. If multiple requests are made, only
1001
+ the most recent response is retained, and thus used for attribute lookup.
1002
+ """
1003
+
1004
+ def __init__(
1005
+ self,
1006
+ method: Callable[..., analytics_admin.SearchChangeHistoryEventsResponse],
1007
+ request: analytics_admin.SearchChangeHistoryEventsRequest,
1008
+ response: analytics_admin.SearchChangeHistoryEventsResponse,
1009
+ *,
1010
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1011
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1012
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1013
+ ):
1014
+ """Instantiate the pager.
1015
+
1016
+ Args:
1017
+ method (Callable): The method that was originally called, and
1018
+ which instantiated this pager.
1019
+ request (google.analytics.admin_v1beta.types.SearchChangeHistoryEventsRequest):
1020
+ The initial request object.
1021
+ response (google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse):
1022
+ The initial response object.
1023
+ retry (google.api_core.retry.Retry): Designation of what errors,
1024
+ if any, should be retried.
1025
+ timeout (float): The timeout for this request.
1026
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1027
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1028
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1029
+ be of type `bytes`.
1030
+ """
1031
+ self._method = method
1032
+ self._request = analytics_admin.SearchChangeHistoryEventsRequest(request)
1033
+ self._response = response
1034
+ self._retry = retry
1035
+ self._timeout = timeout
1036
+ self._metadata = metadata
1037
+
1038
+ def __getattr__(self, name: str) -> Any:
1039
+ return getattr(self._response, name)
1040
+
1041
+ @property
1042
+ def pages(self) -> Iterator[analytics_admin.SearchChangeHistoryEventsResponse]:
1043
+ yield self._response
1044
+ while self._response.next_page_token:
1045
+ self._request.page_token = self._response.next_page_token
1046
+ self._response = self._method(
1047
+ self._request,
1048
+ retry=self._retry,
1049
+ timeout=self._timeout,
1050
+ metadata=self._metadata,
1051
+ )
1052
+ yield self._response
1053
+
1054
+ def __iter__(self) -> Iterator[resources.ChangeHistoryEvent]:
1055
+ for page in self.pages:
1056
+ yield from page.change_history_events
1057
+
1058
+ def __repr__(self) -> str:
1059
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1060
+
1061
+
1062
+ class SearchChangeHistoryEventsAsyncPager:
1063
+ """A pager for iterating through ``search_change_history_events`` requests.
1064
+
1065
+ This class thinly wraps an initial
1066
+ :class:`google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse` object, and
1067
+ provides an ``__aiter__`` method to iterate through its
1068
+ ``change_history_events`` field.
1069
+
1070
+ If there are more pages, the ``__aiter__`` method will make additional
1071
+ ``SearchChangeHistoryEvents`` requests and continue to iterate
1072
+ through the ``change_history_events`` field on the
1073
+ corresponding responses.
1074
+
1075
+ All the usual :class:`google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse`
1076
+ attributes are available on the pager. If multiple requests are made, only
1077
+ the most recent response is retained, and thus used for attribute lookup.
1078
+ """
1079
+
1080
+ def __init__(
1081
+ self,
1082
+ method: Callable[
1083
+ ..., Awaitable[analytics_admin.SearchChangeHistoryEventsResponse]
1084
+ ],
1085
+ request: analytics_admin.SearchChangeHistoryEventsRequest,
1086
+ response: analytics_admin.SearchChangeHistoryEventsResponse,
1087
+ *,
1088
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1089
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1090
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1091
+ ):
1092
+ """Instantiates the pager.
1093
+
1094
+ Args:
1095
+ method (Callable): The method that was originally called, and
1096
+ which instantiated this pager.
1097
+ request (google.analytics.admin_v1beta.types.SearchChangeHistoryEventsRequest):
1098
+ The initial request object.
1099
+ response (google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse):
1100
+ The initial response object.
1101
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1102
+ if any, should be retried.
1103
+ timeout (float): The timeout for this request.
1104
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1105
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1106
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1107
+ be of type `bytes`.
1108
+ """
1109
+ self._method = method
1110
+ self._request = analytics_admin.SearchChangeHistoryEventsRequest(request)
1111
+ self._response = response
1112
+ self._retry = retry
1113
+ self._timeout = timeout
1114
+ self._metadata = metadata
1115
+
1116
+ def __getattr__(self, name: str) -> Any:
1117
+ return getattr(self._response, name)
1118
+
1119
+ @property
1120
+ async def pages(
1121
+ self,
1122
+ ) -> AsyncIterator[analytics_admin.SearchChangeHistoryEventsResponse]:
1123
+ yield self._response
1124
+ while self._response.next_page_token:
1125
+ self._request.page_token = self._response.next_page_token
1126
+ self._response = await self._method(
1127
+ self._request,
1128
+ retry=self._retry,
1129
+ timeout=self._timeout,
1130
+ metadata=self._metadata,
1131
+ )
1132
+ yield self._response
1133
+
1134
+ def __aiter__(self) -> AsyncIterator[resources.ChangeHistoryEvent]:
1135
+ async def async_generator():
1136
+ async for page in self.pages:
1137
+ for response in page.change_history_events:
1138
+ yield response
1139
+
1140
+ return async_generator()
1141
+
1142
+ def __repr__(self) -> str:
1143
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1144
+
1145
+
1146
+ class ListConversionEventsPager:
1147
+ """A pager for iterating through ``list_conversion_events`` requests.
1148
+
1149
+ This class thinly wraps an initial
1150
+ :class:`google.analytics.admin_v1beta.types.ListConversionEventsResponse` object, and
1151
+ provides an ``__iter__`` method to iterate through its
1152
+ ``conversion_events`` field.
1153
+
1154
+ If there are more pages, the ``__iter__`` method will make additional
1155
+ ``ListConversionEvents`` requests and continue to iterate
1156
+ through the ``conversion_events`` field on the
1157
+ corresponding responses.
1158
+
1159
+ All the usual :class:`google.analytics.admin_v1beta.types.ListConversionEventsResponse`
1160
+ attributes are available on the pager. If multiple requests are made, only
1161
+ the most recent response is retained, and thus used for attribute lookup.
1162
+ """
1163
+
1164
+ def __init__(
1165
+ self,
1166
+ method: Callable[..., analytics_admin.ListConversionEventsResponse],
1167
+ request: analytics_admin.ListConversionEventsRequest,
1168
+ response: analytics_admin.ListConversionEventsResponse,
1169
+ *,
1170
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1171
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1172
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1173
+ ):
1174
+ """Instantiate the pager.
1175
+
1176
+ Args:
1177
+ method (Callable): The method that was originally called, and
1178
+ which instantiated this pager.
1179
+ request (google.analytics.admin_v1beta.types.ListConversionEventsRequest):
1180
+ The initial request object.
1181
+ response (google.analytics.admin_v1beta.types.ListConversionEventsResponse):
1182
+ The initial response object.
1183
+ retry (google.api_core.retry.Retry): Designation of what errors,
1184
+ if any, should be retried.
1185
+ timeout (float): The timeout for this request.
1186
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1187
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1188
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1189
+ be of type `bytes`.
1190
+ """
1191
+ self._method = method
1192
+ self._request = analytics_admin.ListConversionEventsRequest(request)
1193
+ self._response = response
1194
+ self._retry = retry
1195
+ self._timeout = timeout
1196
+ self._metadata = metadata
1197
+
1198
+ def __getattr__(self, name: str) -> Any:
1199
+ return getattr(self._response, name)
1200
+
1201
+ @property
1202
+ def pages(self) -> Iterator[analytics_admin.ListConversionEventsResponse]:
1203
+ yield self._response
1204
+ while self._response.next_page_token:
1205
+ self._request.page_token = self._response.next_page_token
1206
+ self._response = self._method(
1207
+ self._request,
1208
+ retry=self._retry,
1209
+ timeout=self._timeout,
1210
+ metadata=self._metadata,
1211
+ )
1212
+ yield self._response
1213
+
1214
+ def __iter__(self) -> Iterator[resources.ConversionEvent]:
1215
+ for page in self.pages:
1216
+ yield from page.conversion_events
1217
+
1218
+ def __repr__(self) -> str:
1219
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1220
+
1221
+
1222
+ class ListConversionEventsAsyncPager:
1223
+ """A pager for iterating through ``list_conversion_events`` requests.
1224
+
1225
+ This class thinly wraps an initial
1226
+ :class:`google.analytics.admin_v1beta.types.ListConversionEventsResponse` object, and
1227
+ provides an ``__aiter__`` method to iterate through its
1228
+ ``conversion_events`` field.
1229
+
1230
+ If there are more pages, the ``__aiter__`` method will make additional
1231
+ ``ListConversionEvents`` requests and continue to iterate
1232
+ through the ``conversion_events`` field on the
1233
+ corresponding responses.
1234
+
1235
+ All the usual :class:`google.analytics.admin_v1beta.types.ListConversionEventsResponse`
1236
+ attributes are available on the pager. If multiple requests are made, only
1237
+ the most recent response is retained, and thus used for attribute lookup.
1238
+ """
1239
+
1240
+ def __init__(
1241
+ self,
1242
+ method: Callable[..., Awaitable[analytics_admin.ListConversionEventsResponse]],
1243
+ request: analytics_admin.ListConversionEventsRequest,
1244
+ response: analytics_admin.ListConversionEventsResponse,
1245
+ *,
1246
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1247
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1248
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1249
+ ):
1250
+ """Instantiates the pager.
1251
+
1252
+ Args:
1253
+ method (Callable): The method that was originally called, and
1254
+ which instantiated this pager.
1255
+ request (google.analytics.admin_v1beta.types.ListConversionEventsRequest):
1256
+ The initial request object.
1257
+ response (google.analytics.admin_v1beta.types.ListConversionEventsResponse):
1258
+ The initial response object.
1259
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1260
+ if any, should be retried.
1261
+ timeout (float): The timeout for this request.
1262
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1263
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1264
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1265
+ be of type `bytes`.
1266
+ """
1267
+ self._method = method
1268
+ self._request = analytics_admin.ListConversionEventsRequest(request)
1269
+ self._response = response
1270
+ self._retry = retry
1271
+ self._timeout = timeout
1272
+ self._metadata = metadata
1273
+
1274
+ def __getattr__(self, name: str) -> Any:
1275
+ return getattr(self._response, name)
1276
+
1277
+ @property
1278
+ async def pages(
1279
+ self,
1280
+ ) -> AsyncIterator[analytics_admin.ListConversionEventsResponse]:
1281
+ yield self._response
1282
+ while self._response.next_page_token:
1283
+ self._request.page_token = self._response.next_page_token
1284
+ self._response = await self._method(
1285
+ self._request,
1286
+ retry=self._retry,
1287
+ timeout=self._timeout,
1288
+ metadata=self._metadata,
1289
+ )
1290
+ yield self._response
1291
+
1292
+ def __aiter__(self) -> AsyncIterator[resources.ConversionEvent]:
1293
+ async def async_generator():
1294
+ async for page in self.pages:
1295
+ for response in page.conversion_events:
1296
+ yield response
1297
+
1298
+ return async_generator()
1299
+
1300
+ def __repr__(self) -> str:
1301
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1302
+
1303
+
1304
+ class ListKeyEventsPager:
1305
+ """A pager for iterating through ``list_key_events`` requests.
1306
+
1307
+ This class thinly wraps an initial
1308
+ :class:`google.analytics.admin_v1beta.types.ListKeyEventsResponse` object, and
1309
+ provides an ``__iter__`` method to iterate through its
1310
+ ``key_events`` field.
1311
+
1312
+ If there are more pages, the ``__iter__`` method will make additional
1313
+ ``ListKeyEvents`` requests and continue to iterate
1314
+ through the ``key_events`` field on the
1315
+ corresponding responses.
1316
+
1317
+ All the usual :class:`google.analytics.admin_v1beta.types.ListKeyEventsResponse`
1318
+ attributes are available on the pager. If multiple requests are made, only
1319
+ the most recent response is retained, and thus used for attribute lookup.
1320
+ """
1321
+
1322
+ def __init__(
1323
+ self,
1324
+ method: Callable[..., analytics_admin.ListKeyEventsResponse],
1325
+ request: analytics_admin.ListKeyEventsRequest,
1326
+ response: analytics_admin.ListKeyEventsResponse,
1327
+ *,
1328
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1329
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1330
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1331
+ ):
1332
+ """Instantiate the pager.
1333
+
1334
+ Args:
1335
+ method (Callable): The method that was originally called, and
1336
+ which instantiated this pager.
1337
+ request (google.analytics.admin_v1beta.types.ListKeyEventsRequest):
1338
+ The initial request object.
1339
+ response (google.analytics.admin_v1beta.types.ListKeyEventsResponse):
1340
+ The initial response object.
1341
+ retry (google.api_core.retry.Retry): Designation of what errors,
1342
+ if any, should be retried.
1343
+ timeout (float): The timeout for this request.
1344
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1345
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1346
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1347
+ be of type `bytes`.
1348
+ """
1349
+ self._method = method
1350
+ self._request = analytics_admin.ListKeyEventsRequest(request)
1351
+ self._response = response
1352
+ self._retry = retry
1353
+ self._timeout = timeout
1354
+ self._metadata = metadata
1355
+
1356
+ def __getattr__(self, name: str) -> Any:
1357
+ return getattr(self._response, name)
1358
+
1359
+ @property
1360
+ def pages(self) -> Iterator[analytics_admin.ListKeyEventsResponse]:
1361
+ yield self._response
1362
+ while self._response.next_page_token:
1363
+ self._request.page_token = self._response.next_page_token
1364
+ self._response = self._method(
1365
+ self._request,
1366
+ retry=self._retry,
1367
+ timeout=self._timeout,
1368
+ metadata=self._metadata,
1369
+ )
1370
+ yield self._response
1371
+
1372
+ def __iter__(self) -> Iterator[resources.KeyEvent]:
1373
+ for page in self.pages:
1374
+ yield from page.key_events
1375
+
1376
+ def __repr__(self) -> str:
1377
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1378
+
1379
+
1380
+ class ListKeyEventsAsyncPager:
1381
+ """A pager for iterating through ``list_key_events`` requests.
1382
+
1383
+ This class thinly wraps an initial
1384
+ :class:`google.analytics.admin_v1beta.types.ListKeyEventsResponse` object, and
1385
+ provides an ``__aiter__`` method to iterate through its
1386
+ ``key_events`` field.
1387
+
1388
+ If there are more pages, the ``__aiter__`` method will make additional
1389
+ ``ListKeyEvents`` requests and continue to iterate
1390
+ through the ``key_events`` field on the
1391
+ corresponding responses.
1392
+
1393
+ All the usual :class:`google.analytics.admin_v1beta.types.ListKeyEventsResponse`
1394
+ attributes are available on the pager. If multiple requests are made, only
1395
+ the most recent response is retained, and thus used for attribute lookup.
1396
+ """
1397
+
1398
+ def __init__(
1399
+ self,
1400
+ method: Callable[..., Awaitable[analytics_admin.ListKeyEventsResponse]],
1401
+ request: analytics_admin.ListKeyEventsRequest,
1402
+ response: analytics_admin.ListKeyEventsResponse,
1403
+ *,
1404
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1405
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1406
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1407
+ ):
1408
+ """Instantiates the pager.
1409
+
1410
+ Args:
1411
+ method (Callable): The method that was originally called, and
1412
+ which instantiated this pager.
1413
+ request (google.analytics.admin_v1beta.types.ListKeyEventsRequest):
1414
+ The initial request object.
1415
+ response (google.analytics.admin_v1beta.types.ListKeyEventsResponse):
1416
+ The initial response object.
1417
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1418
+ if any, should be retried.
1419
+ timeout (float): The timeout for this request.
1420
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1421
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1422
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1423
+ be of type `bytes`.
1424
+ """
1425
+ self._method = method
1426
+ self._request = analytics_admin.ListKeyEventsRequest(request)
1427
+ self._response = response
1428
+ self._retry = retry
1429
+ self._timeout = timeout
1430
+ self._metadata = metadata
1431
+
1432
+ def __getattr__(self, name: str) -> Any:
1433
+ return getattr(self._response, name)
1434
+
1435
+ @property
1436
+ async def pages(self) -> AsyncIterator[analytics_admin.ListKeyEventsResponse]:
1437
+ yield self._response
1438
+ while self._response.next_page_token:
1439
+ self._request.page_token = self._response.next_page_token
1440
+ self._response = await self._method(
1441
+ self._request,
1442
+ retry=self._retry,
1443
+ timeout=self._timeout,
1444
+ metadata=self._metadata,
1445
+ )
1446
+ yield self._response
1447
+
1448
+ def __aiter__(self) -> AsyncIterator[resources.KeyEvent]:
1449
+ async def async_generator():
1450
+ async for page in self.pages:
1451
+ for response in page.key_events:
1452
+ yield response
1453
+
1454
+ return async_generator()
1455
+
1456
+ def __repr__(self) -> str:
1457
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1458
+
1459
+
1460
+ class ListCustomDimensionsPager:
1461
+ """A pager for iterating through ``list_custom_dimensions`` requests.
1462
+
1463
+ This class thinly wraps an initial
1464
+ :class:`google.analytics.admin_v1beta.types.ListCustomDimensionsResponse` object, and
1465
+ provides an ``__iter__`` method to iterate through its
1466
+ ``custom_dimensions`` field.
1467
+
1468
+ If there are more pages, the ``__iter__`` method will make additional
1469
+ ``ListCustomDimensions`` requests and continue to iterate
1470
+ through the ``custom_dimensions`` field on the
1471
+ corresponding responses.
1472
+
1473
+ All the usual :class:`google.analytics.admin_v1beta.types.ListCustomDimensionsResponse`
1474
+ attributes are available on the pager. If multiple requests are made, only
1475
+ the most recent response is retained, and thus used for attribute lookup.
1476
+ """
1477
+
1478
+ def __init__(
1479
+ self,
1480
+ method: Callable[..., analytics_admin.ListCustomDimensionsResponse],
1481
+ request: analytics_admin.ListCustomDimensionsRequest,
1482
+ response: analytics_admin.ListCustomDimensionsResponse,
1483
+ *,
1484
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1485
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1486
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1487
+ ):
1488
+ """Instantiate the pager.
1489
+
1490
+ Args:
1491
+ method (Callable): The method that was originally called, and
1492
+ which instantiated this pager.
1493
+ request (google.analytics.admin_v1beta.types.ListCustomDimensionsRequest):
1494
+ The initial request object.
1495
+ response (google.analytics.admin_v1beta.types.ListCustomDimensionsResponse):
1496
+ The initial response object.
1497
+ retry (google.api_core.retry.Retry): Designation of what errors,
1498
+ if any, should be retried.
1499
+ timeout (float): The timeout for this request.
1500
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1501
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1502
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1503
+ be of type `bytes`.
1504
+ """
1505
+ self._method = method
1506
+ self._request = analytics_admin.ListCustomDimensionsRequest(request)
1507
+ self._response = response
1508
+ self._retry = retry
1509
+ self._timeout = timeout
1510
+ self._metadata = metadata
1511
+
1512
+ def __getattr__(self, name: str) -> Any:
1513
+ return getattr(self._response, name)
1514
+
1515
+ @property
1516
+ def pages(self) -> Iterator[analytics_admin.ListCustomDimensionsResponse]:
1517
+ yield self._response
1518
+ while self._response.next_page_token:
1519
+ self._request.page_token = self._response.next_page_token
1520
+ self._response = self._method(
1521
+ self._request,
1522
+ retry=self._retry,
1523
+ timeout=self._timeout,
1524
+ metadata=self._metadata,
1525
+ )
1526
+ yield self._response
1527
+
1528
+ def __iter__(self) -> Iterator[resources.CustomDimension]:
1529
+ for page in self.pages:
1530
+ yield from page.custom_dimensions
1531
+
1532
+ def __repr__(self) -> str:
1533
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1534
+
1535
+
1536
+ class ListCustomDimensionsAsyncPager:
1537
+ """A pager for iterating through ``list_custom_dimensions`` requests.
1538
+
1539
+ This class thinly wraps an initial
1540
+ :class:`google.analytics.admin_v1beta.types.ListCustomDimensionsResponse` object, and
1541
+ provides an ``__aiter__`` method to iterate through its
1542
+ ``custom_dimensions`` field.
1543
+
1544
+ If there are more pages, the ``__aiter__`` method will make additional
1545
+ ``ListCustomDimensions`` requests and continue to iterate
1546
+ through the ``custom_dimensions`` field on the
1547
+ corresponding responses.
1548
+
1549
+ All the usual :class:`google.analytics.admin_v1beta.types.ListCustomDimensionsResponse`
1550
+ attributes are available on the pager. If multiple requests are made, only
1551
+ the most recent response is retained, and thus used for attribute lookup.
1552
+ """
1553
+
1554
+ def __init__(
1555
+ self,
1556
+ method: Callable[..., Awaitable[analytics_admin.ListCustomDimensionsResponse]],
1557
+ request: analytics_admin.ListCustomDimensionsRequest,
1558
+ response: analytics_admin.ListCustomDimensionsResponse,
1559
+ *,
1560
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1561
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1562
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1563
+ ):
1564
+ """Instantiates the pager.
1565
+
1566
+ Args:
1567
+ method (Callable): The method that was originally called, and
1568
+ which instantiated this pager.
1569
+ request (google.analytics.admin_v1beta.types.ListCustomDimensionsRequest):
1570
+ The initial request object.
1571
+ response (google.analytics.admin_v1beta.types.ListCustomDimensionsResponse):
1572
+ The initial response object.
1573
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1574
+ if any, should be retried.
1575
+ timeout (float): The timeout for this request.
1576
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1577
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1578
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1579
+ be of type `bytes`.
1580
+ """
1581
+ self._method = method
1582
+ self._request = analytics_admin.ListCustomDimensionsRequest(request)
1583
+ self._response = response
1584
+ self._retry = retry
1585
+ self._timeout = timeout
1586
+ self._metadata = metadata
1587
+
1588
+ def __getattr__(self, name: str) -> Any:
1589
+ return getattr(self._response, name)
1590
+
1591
+ @property
1592
+ async def pages(
1593
+ self,
1594
+ ) -> AsyncIterator[analytics_admin.ListCustomDimensionsResponse]:
1595
+ yield self._response
1596
+ while self._response.next_page_token:
1597
+ self._request.page_token = self._response.next_page_token
1598
+ self._response = await self._method(
1599
+ self._request,
1600
+ retry=self._retry,
1601
+ timeout=self._timeout,
1602
+ metadata=self._metadata,
1603
+ )
1604
+ yield self._response
1605
+
1606
+ def __aiter__(self) -> AsyncIterator[resources.CustomDimension]:
1607
+ async def async_generator():
1608
+ async for page in self.pages:
1609
+ for response in page.custom_dimensions:
1610
+ yield response
1611
+
1612
+ return async_generator()
1613
+
1614
+ def __repr__(self) -> str:
1615
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1616
+
1617
+
1618
+ class ListCustomMetricsPager:
1619
+ """A pager for iterating through ``list_custom_metrics`` requests.
1620
+
1621
+ This class thinly wraps an initial
1622
+ :class:`google.analytics.admin_v1beta.types.ListCustomMetricsResponse` object, and
1623
+ provides an ``__iter__`` method to iterate through its
1624
+ ``custom_metrics`` field.
1625
+
1626
+ If there are more pages, the ``__iter__`` method will make additional
1627
+ ``ListCustomMetrics`` requests and continue to iterate
1628
+ through the ``custom_metrics`` field on the
1629
+ corresponding responses.
1630
+
1631
+ All the usual :class:`google.analytics.admin_v1beta.types.ListCustomMetricsResponse`
1632
+ attributes are available on the pager. If multiple requests are made, only
1633
+ the most recent response is retained, and thus used for attribute lookup.
1634
+ """
1635
+
1636
+ def __init__(
1637
+ self,
1638
+ method: Callable[..., analytics_admin.ListCustomMetricsResponse],
1639
+ request: analytics_admin.ListCustomMetricsRequest,
1640
+ response: analytics_admin.ListCustomMetricsResponse,
1641
+ *,
1642
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1643
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1644
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1645
+ ):
1646
+ """Instantiate the pager.
1647
+
1648
+ Args:
1649
+ method (Callable): The method that was originally called, and
1650
+ which instantiated this pager.
1651
+ request (google.analytics.admin_v1beta.types.ListCustomMetricsRequest):
1652
+ The initial request object.
1653
+ response (google.analytics.admin_v1beta.types.ListCustomMetricsResponse):
1654
+ The initial response object.
1655
+ retry (google.api_core.retry.Retry): Designation of what errors,
1656
+ if any, should be retried.
1657
+ timeout (float): The timeout for this request.
1658
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1659
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1660
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1661
+ be of type `bytes`.
1662
+ """
1663
+ self._method = method
1664
+ self._request = analytics_admin.ListCustomMetricsRequest(request)
1665
+ self._response = response
1666
+ self._retry = retry
1667
+ self._timeout = timeout
1668
+ self._metadata = metadata
1669
+
1670
+ def __getattr__(self, name: str) -> Any:
1671
+ return getattr(self._response, name)
1672
+
1673
+ @property
1674
+ def pages(self) -> Iterator[analytics_admin.ListCustomMetricsResponse]:
1675
+ yield self._response
1676
+ while self._response.next_page_token:
1677
+ self._request.page_token = self._response.next_page_token
1678
+ self._response = self._method(
1679
+ self._request,
1680
+ retry=self._retry,
1681
+ timeout=self._timeout,
1682
+ metadata=self._metadata,
1683
+ )
1684
+ yield self._response
1685
+
1686
+ def __iter__(self) -> Iterator[resources.CustomMetric]:
1687
+ for page in self.pages:
1688
+ yield from page.custom_metrics
1689
+
1690
+ def __repr__(self) -> str:
1691
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1692
+
1693
+
1694
+ class ListCustomMetricsAsyncPager:
1695
+ """A pager for iterating through ``list_custom_metrics`` requests.
1696
+
1697
+ This class thinly wraps an initial
1698
+ :class:`google.analytics.admin_v1beta.types.ListCustomMetricsResponse` object, and
1699
+ provides an ``__aiter__`` method to iterate through its
1700
+ ``custom_metrics`` field.
1701
+
1702
+ If there are more pages, the ``__aiter__`` method will make additional
1703
+ ``ListCustomMetrics`` requests and continue to iterate
1704
+ through the ``custom_metrics`` field on the
1705
+ corresponding responses.
1706
+
1707
+ All the usual :class:`google.analytics.admin_v1beta.types.ListCustomMetricsResponse`
1708
+ attributes are available on the pager. If multiple requests are made, only
1709
+ the most recent response is retained, and thus used for attribute lookup.
1710
+ """
1711
+
1712
+ def __init__(
1713
+ self,
1714
+ method: Callable[..., Awaitable[analytics_admin.ListCustomMetricsResponse]],
1715
+ request: analytics_admin.ListCustomMetricsRequest,
1716
+ response: analytics_admin.ListCustomMetricsResponse,
1717
+ *,
1718
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1719
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1720
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1721
+ ):
1722
+ """Instantiates the pager.
1723
+
1724
+ Args:
1725
+ method (Callable): The method that was originally called, and
1726
+ which instantiated this pager.
1727
+ request (google.analytics.admin_v1beta.types.ListCustomMetricsRequest):
1728
+ The initial request object.
1729
+ response (google.analytics.admin_v1beta.types.ListCustomMetricsResponse):
1730
+ The initial response object.
1731
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1732
+ if any, should be retried.
1733
+ timeout (float): The timeout for this request.
1734
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1735
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1736
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1737
+ be of type `bytes`.
1738
+ """
1739
+ self._method = method
1740
+ self._request = analytics_admin.ListCustomMetricsRequest(request)
1741
+ self._response = response
1742
+ self._retry = retry
1743
+ self._timeout = timeout
1744
+ self._metadata = metadata
1745
+
1746
+ def __getattr__(self, name: str) -> Any:
1747
+ return getattr(self._response, name)
1748
+
1749
+ @property
1750
+ async def pages(self) -> AsyncIterator[analytics_admin.ListCustomMetricsResponse]:
1751
+ yield self._response
1752
+ while self._response.next_page_token:
1753
+ self._request.page_token = self._response.next_page_token
1754
+ self._response = await self._method(
1755
+ self._request,
1756
+ retry=self._retry,
1757
+ timeout=self._timeout,
1758
+ metadata=self._metadata,
1759
+ )
1760
+ yield self._response
1761
+
1762
+ def __aiter__(self) -> AsyncIterator[resources.CustomMetric]:
1763
+ async def async_generator():
1764
+ async for page in self.pages:
1765
+ for response in page.custom_metrics:
1766
+ yield response
1767
+
1768
+ return async_generator()
1769
+
1770
+ def __repr__(self) -> str:
1771
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1772
+
1773
+
1774
+ class ListDataStreamsPager:
1775
+ """A pager for iterating through ``list_data_streams`` requests.
1776
+
1777
+ This class thinly wraps an initial
1778
+ :class:`google.analytics.admin_v1beta.types.ListDataStreamsResponse` object, and
1779
+ provides an ``__iter__`` method to iterate through its
1780
+ ``data_streams`` field.
1781
+
1782
+ If there are more pages, the ``__iter__`` method will make additional
1783
+ ``ListDataStreams`` requests and continue to iterate
1784
+ through the ``data_streams`` field on the
1785
+ corresponding responses.
1786
+
1787
+ All the usual :class:`google.analytics.admin_v1beta.types.ListDataStreamsResponse`
1788
+ attributes are available on the pager. If multiple requests are made, only
1789
+ the most recent response is retained, and thus used for attribute lookup.
1790
+ """
1791
+
1792
+ def __init__(
1793
+ self,
1794
+ method: Callable[..., analytics_admin.ListDataStreamsResponse],
1795
+ request: analytics_admin.ListDataStreamsRequest,
1796
+ response: analytics_admin.ListDataStreamsResponse,
1797
+ *,
1798
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
1799
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1800
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1801
+ ):
1802
+ """Instantiate the pager.
1803
+
1804
+ Args:
1805
+ method (Callable): The method that was originally called, and
1806
+ which instantiated this pager.
1807
+ request (google.analytics.admin_v1beta.types.ListDataStreamsRequest):
1808
+ The initial request object.
1809
+ response (google.analytics.admin_v1beta.types.ListDataStreamsResponse):
1810
+ The initial response object.
1811
+ retry (google.api_core.retry.Retry): Designation of what errors,
1812
+ if any, should be retried.
1813
+ timeout (float): The timeout for this request.
1814
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1815
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1816
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1817
+ be of type `bytes`.
1818
+ """
1819
+ self._method = method
1820
+ self._request = analytics_admin.ListDataStreamsRequest(request)
1821
+ self._response = response
1822
+ self._retry = retry
1823
+ self._timeout = timeout
1824
+ self._metadata = metadata
1825
+
1826
+ def __getattr__(self, name: str) -> Any:
1827
+ return getattr(self._response, name)
1828
+
1829
+ @property
1830
+ def pages(self) -> Iterator[analytics_admin.ListDataStreamsResponse]:
1831
+ yield self._response
1832
+ while self._response.next_page_token:
1833
+ self._request.page_token = self._response.next_page_token
1834
+ self._response = self._method(
1835
+ self._request,
1836
+ retry=self._retry,
1837
+ timeout=self._timeout,
1838
+ metadata=self._metadata,
1839
+ )
1840
+ yield self._response
1841
+
1842
+ def __iter__(self) -> Iterator[resources.DataStream]:
1843
+ for page in self.pages:
1844
+ yield from page.data_streams
1845
+
1846
+ def __repr__(self) -> str:
1847
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
1848
+
1849
+
1850
+ class ListDataStreamsAsyncPager:
1851
+ """A pager for iterating through ``list_data_streams`` requests.
1852
+
1853
+ This class thinly wraps an initial
1854
+ :class:`google.analytics.admin_v1beta.types.ListDataStreamsResponse` object, and
1855
+ provides an ``__aiter__`` method to iterate through its
1856
+ ``data_streams`` field.
1857
+
1858
+ If there are more pages, the ``__aiter__`` method will make additional
1859
+ ``ListDataStreams`` requests and continue to iterate
1860
+ through the ``data_streams`` field on the
1861
+ corresponding responses.
1862
+
1863
+ All the usual :class:`google.analytics.admin_v1beta.types.ListDataStreamsResponse`
1864
+ attributes are available on the pager. If multiple requests are made, only
1865
+ the most recent response is retained, and thus used for attribute lookup.
1866
+ """
1867
+
1868
+ def __init__(
1869
+ self,
1870
+ method: Callable[..., Awaitable[analytics_admin.ListDataStreamsResponse]],
1871
+ request: analytics_admin.ListDataStreamsRequest,
1872
+ response: analytics_admin.ListDataStreamsResponse,
1873
+ *,
1874
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
1875
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1876
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
1877
+ ):
1878
+ """Instantiates the pager.
1879
+
1880
+ Args:
1881
+ method (Callable): The method that was originally called, and
1882
+ which instantiated this pager.
1883
+ request (google.analytics.admin_v1beta.types.ListDataStreamsRequest):
1884
+ The initial request object.
1885
+ response (google.analytics.admin_v1beta.types.ListDataStreamsResponse):
1886
+ The initial response object.
1887
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
1888
+ if any, should be retried.
1889
+ timeout (float): The timeout for this request.
1890
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
1891
+ sent along with the request as metadata. Normally, each value must be of type `str`,
1892
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
1893
+ be of type `bytes`.
1894
+ """
1895
+ self._method = method
1896
+ self._request = analytics_admin.ListDataStreamsRequest(request)
1897
+ self._response = response
1898
+ self._retry = retry
1899
+ self._timeout = timeout
1900
+ self._metadata = metadata
1901
+
1902
+ def __getattr__(self, name: str) -> Any:
1903
+ return getattr(self._response, name)
1904
+
1905
+ @property
1906
+ async def pages(self) -> AsyncIterator[analytics_admin.ListDataStreamsResponse]:
1907
+ yield self._response
1908
+ while self._response.next_page_token:
1909
+ self._request.page_token = self._response.next_page_token
1910
+ self._response = await self._method(
1911
+ self._request,
1912
+ retry=self._retry,
1913
+ timeout=self._timeout,
1914
+ metadata=self._metadata,
1915
+ )
1916
+ yield self._response
1917
+
1918
+ def __aiter__(self) -> AsyncIterator[resources.DataStream]:
1919
+ async def async_generator():
1920
+ async for page in self.pages:
1921
+ for response in page.data_streams:
1922
+ yield response
1923
+
1924
+ return async_generator()
1925
+
1926
+ def __repr__(self) -> str:
1927
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)