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,2857 @@
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
+ import json # type: ignore
17
+ import re
18
+ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
19
+
20
+ from google.api_core import gapic_v1, path_template
21
+ from google.protobuf import empty_pb2 # type: ignore
22
+ from google.protobuf import json_format
23
+
24
+ from google.analytics.admin_v1beta.types import analytics_admin, resources
25
+
26
+ from .base import DEFAULT_CLIENT_INFO, AnalyticsAdminServiceTransport
27
+
28
+
29
+ class _BaseAnalyticsAdminServiceRestTransport(AnalyticsAdminServiceTransport):
30
+ """Base REST backend transport for AnalyticsAdminService.
31
+
32
+ Note: This class is not meant to be used directly. Use its sync and
33
+ async sub-classes instead.
34
+
35
+ This class defines the same methods as the primary client, so the
36
+ primary client can load the underlying transport implementation
37
+ and call it.
38
+
39
+ It sends JSON representations of protocol buffers over HTTP/1.1
40
+ """
41
+
42
+ def __init__(
43
+ self,
44
+ *,
45
+ host: str = "analyticsadmin.googleapis.com",
46
+ credentials: Optional[Any] = None,
47
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
48
+ always_use_jwt_access: Optional[bool] = False,
49
+ url_scheme: str = "https",
50
+ api_audience: Optional[str] = None,
51
+ ) -> None:
52
+ """Instantiate the transport.
53
+ Args:
54
+ host (Optional[str]):
55
+ The hostname to connect to (default: 'analyticsadmin.googleapis.com').
56
+ credentials (Optional[Any]): The
57
+ authorization credentials to attach to requests. These
58
+ credentials identify the application to the service; if none
59
+ are specified, the client will attempt to ascertain the
60
+ credentials from the environment.
61
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
62
+ The client info used to send a user-agent string along with
63
+ API requests. If ``None``, then default info will be used.
64
+ Generally, you only need to set this if you are developing
65
+ your own client library.
66
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
67
+ be used for service account credentials.
68
+ url_scheme: the protocol scheme for the API endpoint. Normally
69
+ "https", but for testing or local servers,
70
+ "http" can be specified.
71
+ """
72
+ # Run the base constructor
73
+ maybe_url_match = re.match("^(?P<scheme>http(?:s)?://)?(?P<host>.*)$", host)
74
+ if maybe_url_match is None:
75
+ raise ValueError(
76
+ f"Unexpected hostname structure: {host}"
77
+ ) # pragma: NO COVER
78
+
79
+ url_match_items = maybe_url_match.groupdict()
80
+
81
+ host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host
82
+
83
+ super().__init__(
84
+ host=host,
85
+ credentials=credentials,
86
+ client_info=client_info,
87
+ always_use_jwt_access=always_use_jwt_access,
88
+ api_audience=api_audience,
89
+ )
90
+
91
+ class _BaseAcknowledgeUserDataCollection:
92
+ def __hash__(self): # pragma: NO COVER
93
+ return NotImplementedError("__hash__ must be implemented.")
94
+
95
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
96
+
97
+ @classmethod
98
+ def _get_unset_required_fields(cls, message_dict):
99
+ return {
100
+ k: v
101
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
102
+ if k not in message_dict
103
+ }
104
+
105
+ @staticmethod
106
+ def _get_http_options():
107
+ http_options: List[Dict[str, str]] = [
108
+ {
109
+ "method": "post",
110
+ "uri": "/v1beta/{property=properties/*}:acknowledgeUserDataCollection",
111
+ "body": "*",
112
+ },
113
+ ]
114
+ return http_options
115
+
116
+ @staticmethod
117
+ def _get_transcoded_request(http_options, request):
118
+ pb_request = analytics_admin.AcknowledgeUserDataCollectionRequest.pb(
119
+ request
120
+ )
121
+ transcoded_request = path_template.transcode(http_options, pb_request)
122
+ return transcoded_request
123
+
124
+ @staticmethod
125
+ def _get_request_body_json(transcoded_request):
126
+ # Jsonify the request body
127
+
128
+ body = json_format.MessageToJson(
129
+ transcoded_request["body"], use_integers_for_enums=True
130
+ )
131
+ return body
132
+
133
+ @staticmethod
134
+ def _get_query_params_json(transcoded_request):
135
+ query_params = json.loads(
136
+ json_format.MessageToJson(
137
+ transcoded_request["query_params"],
138
+ use_integers_for_enums=True,
139
+ )
140
+ )
141
+ query_params.update(
142
+ _BaseAnalyticsAdminServiceRestTransport._BaseAcknowledgeUserDataCollection._get_unset_required_fields(
143
+ query_params
144
+ )
145
+ )
146
+
147
+ query_params["$alt"] = "json;enum-encoding=int"
148
+ return query_params
149
+
150
+ class _BaseArchiveCustomDimension:
151
+ def __hash__(self): # pragma: NO COVER
152
+ return NotImplementedError("__hash__ must be implemented.")
153
+
154
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
155
+
156
+ @classmethod
157
+ def _get_unset_required_fields(cls, message_dict):
158
+ return {
159
+ k: v
160
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
161
+ if k not in message_dict
162
+ }
163
+
164
+ @staticmethod
165
+ def _get_http_options():
166
+ http_options: List[Dict[str, str]] = [
167
+ {
168
+ "method": "post",
169
+ "uri": "/v1beta/{name=properties/*/customDimensions/*}:archive",
170
+ "body": "*",
171
+ },
172
+ ]
173
+ return http_options
174
+
175
+ @staticmethod
176
+ def _get_transcoded_request(http_options, request):
177
+ pb_request = analytics_admin.ArchiveCustomDimensionRequest.pb(request)
178
+ transcoded_request = path_template.transcode(http_options, pb_request)
179
+ return transcoded_request
180
+
181
+ @staticmethod
182
+ def _get_request_body_json(transcoded_request):
183
+ # Jsonify the request body
184
+
185
+ body = json_format.MessageToJson(
186
+ transcoded_request["body"], use_integers_for_enums=True
187
+ )
188
+ return body
189
+
190
+ @staticmethod
191
+ def _get_query_params_json(transcoded_request):
192
+ query_params = json.loads(
193
+ json_format.MessageToJson(
194
+ transcoded_request["query_params"],
195
+ use_integers_for_enums=True,
196
+ )
197
+ )
198
+ query_params.update(
199
+ _BaseAnalyticsAdminServiceRestTransport._BaseArchiveCustomDimension._get_unset_required_fields(
200
+ query_params
201
+ )
202
+ )
203
+
204
+ query_params["$alt"] = "json;enum-encoding=int"
205
+ return query_params
206
+
207
+ class _BaseArchiveCustomMetric:
208
+ def __hash__(self): # pragma: NO COVER
209
+ return NotImplementedError("__hash__ must be implemented.")
210
+
211
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
212
+
213
+ @classmethod
214
+ def _get_unset_required_fields(cls, message_dict):
215
+ return {
216
+ k: v
217
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
218
+ if k not in message_dict
219
+ }
220
+
221
+ @staticmethod
222
+ def _get_http_options():
223
+ http_options: List[Dict[str, str]] = [
224
+ {
225
+ "method": "post",
226
+ "uri": "/v1beta/{name=properties/*/customMetrics/*}:archive",
227
+ "body": "*",
228
+ },
229
+ ]
230
+ return http_options
231
+
232
+ @staticmethod
233
+ def _get_transcoded_request(http_options, request):
234
+ pb_request = analytics_admin.ArchiveCustomMetricRequest.pb(request)
235
+ transcoded_request = path_template.transcode(http_options, pb_request)
236
+ return transcoded_request
237
+
238
+ @staticmethod
239
+ def _get_request_body_json(transcoded_request):
240
+ # Jsonify the request body
241
+
242
+ body = json_format.MessageToJson(
243
+ transcoded_request["body"], use_integers_for_enums=True
244
+ )
245
+ return body
246
+
247
+ @staticmethod
248
+ def _get_query_params_json(transcoded_request):
249
+ query_params = json.loads(
250
+ json_format.MessageToJson(
251
+ transcoded_request["query_params"],
252
+ use_integers_for_enums=True,
253
+ )
254
+ )
255
+ query_params.update(
256
+ _BaseAnalyticsAdminServiceRestTransport._BaseArchiveCustomMetric._get_unset_required_fields(
257
+ query_params
258
+ )
259
+ )
260
+
261
+ query_params["$alt"] = "json;enum-encoding=int"
262
+ return query_params
263
+
264
+ class _BaseCreateConversionEvent:
265
+ def __hash__(self): # pragma: NO COVER
266
+ return NotImplementedError("__hash__ must be implemented.")
267
+
268
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
269
+
270
+ @classmethod
271
+ def _get_unset_required_fields(cls, message_dict):
272
+ return {
273
+ k: v
274
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
275
+ if k not in message_dict
276
+ }
277
+
278
+ @staticmethod
279
+ def _get_http_options():
280
+ http_options: List[Dict[str, str]] = [
281
+ {
282
+ "method": "post",
283
+ "uri": "/v1beta/{parent=properties/*}/conversionEvents",
284
+ "body": "conversion_event",
285
+ },
286
+ ]
287
+ return http_options
288
+
289
+ @staticmethod
290
+ def _get_transcoded_request(http_options, request):
291
+ pb_request = analytics_admin.CreateConversionEventRequest.pb(request)
292
+ transcoded_request = path_template.transcode(http_options, pb_request)
293
+ return transcoded_request
294
+
295
+ @staticmethod
296
+ def _get_request_body_json(transcoded_request):
297
+ # Jsonify the request body
298
+
299
+ body = json_format.MessageToJson(
300
+ transcoded_request["body"], use_integers_for_enums=True
301
+ )
302
+ return body
303
+
304
+ @staticmethod
305
+ def _get_query_params_json(transcoded_request):
306
+ query_params = json.loads(
307
+ json_format.MessageToJson(
308
+ transcoded_request["query_params"],
309
+ use_integers_for_enums=True,
310
+ )
311
+ )
312
+ query_params.update(
313
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateConversionEvent._get_unset_required_fields(
314
+ query_params
315
+ )
316
+ )
317
+
318
+ query_params["$alt"] = "json;enum-encoding=int"
319
+ return query_params
320
+
321
+ class _BaseCreateCustomDimension:
322
+ def __hash__(self): # pragma: NO COVER
323
+ return NotImplementedError("__hash__ must be implemented.")
324
+
325
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
326
+
327
+ @classmethod
328
+ def _get_unset_required_fields(cls, message_dict):
329
+ return {
330
+ k: v
331
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
332
+ if k not in message_dict
333
+ }
334
+
335
+ @staticmethod
336
+ def _get_http_options():
337
+ http_options: List[Dict[str, str]] = [
338
+ {
339
+ "method": "post",
340
+ "uri": "/v1beta/{parent=properties/*}/customDimensions",
341
+ "body": "custom_dimension",
342
+ },
343
+ ]
344
+ return http_options
345
+
346
+ @staticmethod
347
+ def _get_transcoded_request(http_options, request):
348
+ pb_request = analytics_admin.CreateCustomDimensionRequest.pb(request)
349
+ transcoded_request = path_template.transcode(http_options, pb_request)
350
+ return transcoded_request
351
+
352
+ @staticmethod
353
+ def _get_request_body_json(transcoded_request):
354
+ # Jsonify the request body
355
+
356
+ body = json_format.MessageToJson(
357
+ transcoded_request["body"], use_integers_for_enums=True
358
+ )
359
+ return body
360
+
361
+ @staticmethod
362
+ def _get_query_params_json(transcoded_request):
363
+ query_params = json.loads(
364
+ json_format.MessageToJson(
365
+ transcoded_request["query_params"],
366
+ use_integers_for_enums=True,
367
+ )
368
+ )
369
+ query_params.update(
370
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateCustomDimension._get_unset_required_fields(
371
+ query_params
372
+ )
373
+ )
374
+
375
+ query_params["$alt"] = "json;enum-encoding=int"
376
+ return query_params
377
+
378
+ class _BaseCreateCustomMetric:
379
+ def __hash__(self): # pragma: NO COVER
380
+ return NotImplementedError("__hash__ must be implemented.")
381
+
382
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
383
+
384
+ @classmethod
385
+ def _get_unset_required_fields(cls, message_dict):
386
+ return {
387
+ k: v
388
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
389
+ if k not in message_dict
390
+ }
391
+
392
+ @staticmethod
393
+ def _get_http_options():
394
+ http_options: List[Dict[str, str]] = [
395
+ {
396
+ "method": "post",
397
+ "uri": "/v1beta/{parent=properties/*}/customMetrics",
398
+ "body": "custom_metric",
399
+ },
400
+ ]
401
+ return http_options
402
+
403
+ @staticmethod
404
+ def _get_transcoded_request(http_options, request):
405
+ pb_request = analytics_admin.CreateCustomMetricRequest.pb(request)
406
+ transcoded_request = path_template.transcode(http_options, pb_request)
407
+ return transcoded_request
408
+
409
+ @staticmethod
410
+ def _get_request_body_json(transcoded_request):
411
+ # Jsonify the request body
412
+
413
+ body = json_format.MessageToJson(
414
+ transcoded_request["body"], use_integers_for_enums=True
415
+ )
416
+ return body
417
+
418
+ @staticmethod
419
+ def _get_query_params_json(transcoded_request):
420
+ query_params = json.loads(
421
+ json_format.MessageToJson(
422
+ transcoded_request["query_params"],
423
+ use_integers_for_enums=True,
424
+ )
425
+ )
426
+ query_params.update(
427
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateCustomMetric._get_unset_required_fields(
428
+ query_params
429
+ )
430
+ )
431
+
432
+ query_params["$alt"] = "json;enum-encoding=int"
433
+ return query_params
434
+
435
+ class _BaseCreateDataStream:
436
+ def __hash__(self): # pragma: NO COVER
437
+ return NotImplementedError("__hash__ must be implemented.")
438
+
439
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
440
+
441
+ @classmethod
442
+ def _get_unset_required_fields(cls, message_dict):
443
+ return {
444
+ k: v
445
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
446
+ if k not in message_dict
447
+ }
448
+
449
+ @staticmethod
450
+ def _get_http_options():
451
+ http_options: List[Dict[str, str]] = [
452
+ {
453
+ "method": "post",
454
+ "uri": "/v1beta/{parent=properties/*}/dataStreams",
455
+ "body": "data_stream",
456
+ },
457
+ ]
458
+ return http_options
459
+
460
+ @staticmethod
461
+ def _get_transcoded_request(http_options, request):
462
+ pb_request = analytics_admin.CreateDataStreamRequest.pb(request)
463
+ transcoded_request = path_template.transcode(http_options, pb_request)
464
+ return transcoded_request
465
+
466
+ @staticmethod
467
+ def _get_request_body_json(transcoded_request):
468
+ # Jsonify the request body
469
+
470
+ body = json_format.MessageToJson(
471
+ transcoded_request["body"], use_integers_for_enums=True
472
+ )
473
+ return body
474
+
475
+ @staticmethod
476
+ def _get_query_params_json(transcoded_request):
477
+ query_params = json.loads(
478
+ json_format.MessageToJson(
479
+ transcoded_request["query_params"],
480
+ use_integers_for_enums=True,
481
+ )
482
+ )
483
+ query_params.update(
484
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateDataStream._get_unset_required_fields(
485
+ query_params
486
+ )
487
+ )
488
+
489
+ query_params["$alt"] = "json;enum-encoding=int"
490
+ return query_params
491
+
492
+ class _BaseCreateFirebaseLink:
493
+ def __hash__(self): # pragma: NO COVER
494
+ return NotImplementedError("__hash__ must be implemented.")
495
+
496
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
497
+
498
+ @classmethod
499
+ def _get_unset_required_fields(cls, message_dict):
500
+ return {
501
+ k: v
502
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
503
+ if k not in message_dict
504
+ }
505
+
506
+ @staticmethod
507
+ def _get_http_options():
508
+ http_options: List[Dict[str, str]] = [
509
+ {
510
+ "method": "post",
511
+ "uri": "/v1beta/{parent=properties/*}/firebaseLinks",
512
+ "body": "firebase_link",
513
+ },
514
+ ]
515
+ return http_options
516
+
517
+ @staticmethod
518
+ def _get_transcoded_request(http_options, request):
519
+ pb_request = analytics_admin.CreateFirebaseLinkRequest.pb(request)
520
+ transcoded_request = path_template.transcode(http_options, pb_request)
521
+ return transcoded_request
522
+
523
+ @staticmethod
524
+ def _get_request_body_json(transcoded_request):
525
+ # Jsonify the request body
526
+
527
+ body = json_format.MessageToJson(
528
+ transcoded_request["body"], use_integers_for_enums=True
529
+ )
530
+ return body
531
+
532
+ @staticmethod
533
+ def _get_query_params_json(transcoded_request):
534
+ query_params = json.loads(
535
+ json_format.MessageToJson(
536
+ transcoded_request["query_params"],
537
+ use_integers_for_enums=True,
538
+ )
539
+ )
540
+ query_params.update(
541
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateFirebaseLink._get_unset_required_fields(
542
+ query_params
543
+ )
544
+ )
545
+
546
+ query_params["$alt"] = "json;enum-encoding=int"
547
+ return query_params
548
+
549
+ class _BaseCreateGoogleAdsLink:
550
+ def __hash__(self): # pragma: NO COVER
551
+ return NotImplementedError("__hash__ must be implemented.")
552
+
553
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
554
+
555
+ @classmethod
556
+ def _get_unset_required_fields(cls, message_dict):
557
+ return {
558
+ k: v
559
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
560
+ if k not in message_dict
561
+ }
562
+
563
+ @staticmethod
564
+ def _get_http_options():
565
+ http_options: List[Dict[str, str]] = [
566
+ {
567
+ "method": "post",
568
+ "uri": "/v1beta/{parent=properties/*}/googleAdsLinks",
569
+ "body": "google_ads_link",
570
+ },
571
+ ]
572
+ return http_options
573
+
574
+ @staticmethod
575
+ def _get_transcoded_request(http_options, request):
576
+ pb_request = analytics_admin.CreateGoogleAdsLinkRequest.pb(request)
577
+ transcoded_request = path_template.transcode(http_options, pb_request)
578
+ return transcoded_request
579
+
580
+ @staticmethod
581
+ def _get_request_body_json(transcoded_request):
582
+ # Jsonify the request body
583
+
584
+ body = json_format.MessageToJson(
585
+ transcoded_request["body"], use_integers_for_enums=True
586
+ )
587
+ return body
588
+
589
+ @staticmethod
590
+ def _get_query_params_json(transcoded_request):
591
+ query_params = json.loads(
592
+ json_format.MessageToJson(
593
+ transcoded_request["query_params"],
594
+ use_integers_for_enums=True,
595
+ )
596
+ )
597
+ query_params.update(
598
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateGoogleAdsLink._get_unset_required_fields(
599
+ query_params
600
+ )
601
+ )
602
+
603
+ query_params["$alt"] = "json;enum-encoding=int"
604
+ return query_params
605
+
606
+ class _BaseCreateKeyEvent:
607
+ def __hash__(self): # pragma: NO COVER
608
+ return NotImplementedError("__hash__ must be implemented.")
609
+
610
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
611
+
612
+ @classmethod
613
+ def _get_unset_required_fields(cls, message_dict):
614
+ return {
615
+ k: v
616
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
617
+ if k not in message_dict
618
+ }
619
+
620
+ @staticmethod
621
+ def _get_http_options():
622
+ http_options: List[Dict[str, str]] = [
623
+ {
624
+ "method": "post",
625
+ "uri": "/v1beta/{parent=properties/*}/keyEvents",
626
+ "body": "key_event",
627
+ },
628
+ ]
629
+ return http_options
630
+
631
+ @staticmethod
632
+ def _get_transcoded_request(http_options, request):
633
+ pb_request = analytics_admin.CreateKeyEventRequest.pb(request)
634
+ transcoded_request = path_template.transcode(http_options, pb_request)
635
+ return transcoded_request
636
+
637
+ @staticmethod
638
+ def _get_request_body_json(transcoded_request):
639
+ # Jsonify the request body
640
+
641
+ body = json_format.MessageToJson(
642
+ transcoded_request["body"], use_integers_for_enums=True
643
+ )
644
+ return body
645
+
646
+ @staticmethod
647
+ def _get_query_params_json(transcoded_request):
648
+ query_params = json.loads(
649
+ json_format.MessageToJson(
650
+ transcoded_request["query_params"],
651
+ use_integers_for_enums=True,
652
+ )
653
+ )
654
+ query_params.update(
655
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateKeyEvent._get_unset_required_fields(
656
+ query_params
657
+ )
658
+ )
659
+
660
+ query_params["$alt"] = "json;enum-encoding=int"
661
+ return query_params
662
+
663
+ class _BaseCreateMeasurementProtocolSecret:
664
+ def __hash__(self): # pragma: NO COVER
665
+ return NotImplementedError("__hash__ must be implemented.")
666
+
667
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
668
+
669
+ @classmethod
670
+ def _get_unset_required_fields(cls, message_dict):
671
+ return {
672
+ k: v
673
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
674
+ if k not in message_dict
675
+ }
676
+
677
+ @staticmethod
678
+ def _get_http_options():
679
+ http_options: List[Dict[str, str]] = [
680
+ {
681
+ "method": "post",
682
+ "uri": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets",
683
+ "body": "measurement_protocol_secret",
684
+ },
685
+ ]
686
+ return http_options
687
+
688
+ @staticmethod
689
+ def _get_transcoded_request(http_options, request):
690
+ pb_request = analytics_admin.CreateMeasurementProtocolSecretRequest.pb(
691
+ request
692
+ )
693
+ transcoded_request = path_template.transcode(http_options, pb_request)
694
+ return transcoded_request
695
+
696
+ @staticmethod
697
+ def _get_request_body_json(transcoded_request):
698
+ # Jsonify the request body
699
+
700
+ body = json_format.MessageToJson(
701
+ transcoded_request["body"], use_integers_for_enums=True
702
+ )
703
+ return body
704
+
705
+ @staticmethod
706
+ def _get_query_params_json(transcoded_request):
707
+ query_params = json.loads(
708
+ json_format.MessageToJson(
709
+ transcoded_request["query_params"],
710
+ use_integers_for_enums=True,
711
+ )
712
+ )
713
+ query_params.update(
714
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateMeasurementProtocolSecret._get_unset_required_fields(
715
+ query_params
716
+ )
717
+ )
718
+
719
+ query_params["$alt"] = "json;enum-encoding=int"
720
+ return query_params
721
+
722
+ class _BaseCreateProperty:
723
+ def __hash__(self): # pragma: NO COVER
724
+ return NotImplementedError("__hash__ must be implemented.")
725
+
726
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
727
+
728
+ @classmethod
729
+ def _get_unset_required_fields(cls, message_dict):
730
+ return {
731
+ k: v
732
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
733
+ if k not in message_dict
734
+ }
735
+
736
+ @staticmethod
737
+ def _get_http_options():
738
+ http_options: List[Dict[str, str]] = [
739
+ {
740
+ "method": "post",
741
+ "uri": "/v1beta/properties",
742
+ "body": "property",
743
+ },
744
+ ]
745
+ return http_options
746
+
747
+ @staticmethod
748
+ def _get_transcoded_request(http_options, request):
749
+ pb_request = analytics_admin.CreatePropertyRequest.pb(request)
750
+ transcoded_request = path_template.transcode(http_options, pb_request)
751
+ return transcoded_request
752
+
753
+ @staticmethod
754
+ def _get_request_body_json(transcoded_request):
755
+ # Jsonify the request body
756
+
757
+ body = json_format.MessageToJson(
758
+ transcoded_request["body"], use_integers_for_enums=True
759
+ )
760
+ return body
761
+
762
+ @staticmethod
763
+ def _get_query_params_json(transcoded_request):
764
+ query_params = json.loads(
765
+ json_format.MessageToJson(
766
+ transcoded_request["query_params"],
767
+ use_integers_for_enums=True,
768
+ )
769
+ )
770
+ query_params.update(
771
+ _BaseAnalyticsAdminServiceRestTransport._BaseCreateProperty._get_unset_required_fields(
772
+ query_params
773
+ )
774
+ )
775
+
776
+ query_params["$alt"] = "json;enum-encoding=int"
777
+ return query_params
778
+
779
+ class _BaseDeleteAccount:
780
+ def __hash__(self): # pragma: NO COVER
781
+ return NotImplementedError("__hash__ must be implemented.")
782
+
783
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
784
+
785
+ @classmethod
786
+ def _get_unset_required_fields(cls, message_dict):
787
+ return {
788
+ k: v
789
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
790
+ if k not in message_dict
791
+ }
792
+
793
+ @staticmethod
794
+ def _get_http_options():
795
+ http_options: List[Dict[str, str]] = [
796
+ {
797
+ "method": "delete",
798
+ "uri": "/v1beta/{name=accounts/*}",
799
+ },
800
+ ]
801
+ return http_options
802
+
803
+ @staticmethod
804
+ def _get_transcoded_request(http_options, request):
805
+ pb_request = analytics_admin.DeleteAccountRequest.pb(request)
806
+ transcoded_request = path_template.transcode(http_options, pb_request)
807
+ return transcoded_request
808
+
809
+ @staticmethod
810
+ def _get_query_params_json(transcoded_request):
811
+ query_params = json.loads(
812
+ json_format.MessageToJson(
813
+ transcoded_request["query_params"],
814
+ use_integers_for_enums=True,
815
+ )
816
+ )
817
+ query_params.update(
818
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteAccount._get_unset_required_fields(
819
+ query_params
820
+ )
821
+ )
822
+
823
+ query_params["$alt"] = "json;enum-encoding=int"
824
+ return query_params
825
+
826
+ class _BaseDeleteConversionEvent:
827
+ def __hash__(self): # pragma: NO COVER
828
+ return NotImplementedError("__hash__ must be implemented.")
829
+
830
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
831
+
832
+ @classmethod
833
+ def _get_unset_required_fields(cls, message_dict):
834
+ return {
835
+ k: v
836
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
837
+ if k not in message_dict
838
+ }
839
+
840
+ @staticmethod
841
+ def _get_http_options():
842
+ http_options: List[Dict[str, str]] = [
843
+ {
844
+ "method": "delete",
845
+ "uri": "/v1beta/{name=properties/*/conversionEvents/*}",
846
+ },
847
+ ]
848
+ return http_options
849
+
850
+ @staticmethod
851
+ def _get_transcoded_request(http_options, request):
852
+ pb_request = analytics_admin.DeleteConversionEventRequest.pb(request)
853
+ transcoded_request = path_template.transcode(http_options, pb_request)
854
+ return transcoded_request
855
+
856
+ @staticmethod
857
+ def _get_query_params_json(transcoded_request):
858
+ query_params = json.loads(
859
+ json_format.MessageToJson(
860
+ transcoded_request["query_params"],
861
+ use_integers_for_enums=True,
862
+ )
863
+ )
864
+ query_params.update(
865
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteConversionEvent._get_unset_required_fields(
866
+ query_params
867
+ )
868
+ )
869
+
870
+ query_params["$alt"] = "json;enum-encoding=int"
871
+ return query_params
872
+
873
+ class _BaseDeleteDataStream:
874
+ def __hash__(self): # pragma: NO COVER
875
+ return NotImplementedError("__hash__ must be implemented.")
876
+
877
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
878
+
879
+ @classmethod
880
+ def _get_unset_required_fields(cls, message_dict):
881
+ return {
882
+ k: v
883
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
884
+ if k not in message_dict
885
+ }
886
+
887
+ @staticmethod
888
+ def _get_http_options():
889
+ http_options: List[Dict[str, str]] = [
890
+ {
891
+ "method": "delete",
892
+ "uri": "/v1beta/{name=properties/*/dataStreams/*}",
893
+ },
894
+ ]
895
+ return http_options
896
+
897
+ @staticmethod
898
+ def _get_transcoded_request(http_options, request):
899
+ pb_request = analytics_admin.DeleteDataStreamRequest.pb(request)
900
+ transcoded_request = path_template.transcode(http_options, pb_request)
901
+ return transcoded_request
902
+
903
+ @staticmethod
904
+ def _get_query_params_json(transcoded_request):
905
+ query_params = json.loads(
906
+ json_format.MessageToJson(
907
+ transcoded_request["query_params"],
908
+ use_integers_for_enums=True,
909
+ )
910
+ )
911
+ query_params.update(
912
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteDataStream._get_unset_required_fields(
913
+ query_params
914
+ )
915
+ )
916
+
917
+ query_params["$alt"] = "json;enum-encoding=int"
918
+ return query_params
919
+
920
+ class _BaseDeleteFirebaseLink:
921
+ def __hash__(self): # pragma: NO COVER
922
+ return NotImplementedError("__hash__ must be implemented.")
923
+
924
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
925
+
926
+ @classmethod
927
+ def _get_unset_required_fields(cls, message_dict):
928
+ return {
929
+ k: v
930
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
931
+ if k not in message_dict
932
+ }
933
+
934
+ @staticmethod
935
+ def _get_http_options():
936
+ http_options: List[Dict[str, str]] = [
937
+ {
938
+ "method": "delete",
939
+ "uri": "/v1beta/{name=properties/*/firebaseLinks/*}",
940
+ },
941
+ ]
942
+ return http_options
943
+
944
+ @staticmethod
945
+ def _get_transcoded_request(http_options, request):
946
+ pb_request = analytics_admin.DeleteFirebaseLinkRequest.pb(request)
947
+ transcoded_request = path_template.transcode(http_options, pb_request)
948
+ return transcoded_request
949
+
950
+ @staticmethod
951
+ def _get_query_params_json(transcoded_request):
952
+ query_params = json.loads(
953
+ json_format.MessageToJson(
954
+ transcoded_request["query_params"],
955
+ use_integers_for_enums=True,
956
+ )
957
+ )
958
+ query_params.update(
959
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteFirebaseLink._get_unset_required_fields(
960
+ query_params
961
+ )
962
+ )
963
+
964
+ query_params["$alt"] = "json;enum-encoding=int"
965
+ return query_params
966
+
967
+ class _BaseDeleteGoogleAdsLink:
968
+ def __hash__(self): # pragma: NO COVER
969
+ return NotImplementedError("__hash__ must be implemented.")
970
+
971
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
972
+
973
+ @classmethod
974
+ def _get_unset_required_fields(cls, message_dict):
975
+ return {
976
+ k: v
977
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
978
+ if k not in message_dict
979
+ }
980
+
981
+ @staticmethod
982
+ def _get_http_options():
983
+ http_options: List[Dict[str, str]] = [
984
+ {
985
+ "method": "delete",
986
+ "uri": "/v1beta/{name=properties/*/googleAdsLinks/*}",
987
+ },
988
+ ]
989
+ return http_options
990
+
991
+ @staticmethod
992
+ def _get_transcoded_request(http_options, request):
993
+ pb_request = analytics_admin.DeleteGoogleAdsLinkRequest.pb(request)
994
+ transcoded_request = path_template.transcode(http_options, pb_request)
995
+ return transcoded_request
996
+
997
+ @staticmethod
998
+ def _get_query_params_json(transcoded_request):
999
+ query_params = json.loads(
1000
+ json_format.MessageToJson(
1001
+ transcoded_request["query_params"],
1002
+ use_integers_for_enums=True,
1003
+ )
1004
+ )
1005
+ query_params.update(
1006
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteGoogleAdsLink._get_unset_required_fields(
1007
+ query_params
1008
+ )
1009
+ )
1010
+
1011
+ query_params["$alt"] = "json;enum-encoding=int"
1012
+ return query_params
1013
+
1014
+ class _BaseDeleteKeyEvent:
1015
+ def __hash__(self): # pragma: NO COVER
1016
+ return NotImplementedError("__hash__ must be implemented.")
1017
+
1018
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1019
+
1020
+ @classmethod
1021
+ def _get_unset_required_fields(cls, message_dict):
1022
+ return {
1023
+ k: v
1024
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1025
+ if k not in message_dict
1026
+ }
1027
+
1028
+ @staticmethod
1029
+ def _get_http_options():
1030
+ http_options: List[Dict[str, str]] = [
1031
+ {
1032
+ "method": "delete",
1033
+ "uri": "/v1beta/{name=properties/*/keyEvents/*}",
1034
+ },
1035
+ ]
1036
+ return http_options
1037
+
1038
+ @staticmethod
1039
+ def _get_transcoded_request(http_options, request):
1040
+ pb_request = analytics_admin.DeleteKeyEventRequest.pb(request)
1041
+ transcoded_request = path_template.transcode(http_options, pb_request)
1042
+ return transcoded_request
1043
+
1044
+ @staticmethod
1045
+ def _get_query_params_json(transcoded_request):
1046
+ query_params = json.loads(
1047
+ json_format.MessageToJson(
1048
+ transcoded_request["query_params"],
1049
+ use_integers_for_enums=True,
1050
+ )
1051
+ )
1052
+ query_params.update(
1053
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteKeyEvent._get_unset_required_fields(
1054
+ query_params
1055
+ )
1056
+ )
1057
+
1058
+ query_params["$alt"] = "json;enum-encoding=int"
1059
+ return query_params
1060
+
1061
+ class _BaseDeleteMeasurementProtocolSecret:
1062
+ def __hash__(self): # pragma: NO COVER
1063
+ return NotImplementedError("__hash__ must be implemented.")
1064
+
1065
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1066
+
1067
+ @classmethod
1068
+ def _get_unset_required_fields(cls, message_dict):
1069
+ return {
1070
+ k: v
1071
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1072
+ if k not in message_dict
1073
+ }
1074
+
1075
+ @staticmethod
1076
+ def _get_http_options():
1077
+ http_options: List[Dict[str, str]] = [
1078
+ {
1079
+ "method": "delete",
1080
+ "uri": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}",
1081
+ },
1082
+ ]
1083
+ return http_options
1084
+
1085
+ @staticmethod
1086
+ def _get_transcoded_request(http_options, request):
1087
+ pb_request = analytics_admin.DeleteMeasurementProtocolSecretRequest.pb(
1088
+ request
1089
+ )
1090
+ transcoded_request = path_template.transcode(http_options, pb_request)
1091
+ return transcoded_request
1092
+
1093
+ @staticmethod
1094
+ def _get_query_params_json(transcoded_request):
1095
+ query_params = json.loads(
1096
+ json_format.MessageToJson(
1097
+ transcoded_request["query_params"],
1098
+ use_integers_for_enums=True,
1099
+ )
1100
+ )
1101
+ query_params.update(
1102
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteMeasurementProtocolSecret._get_unset_required_fields(
1103
+ query_params
1104
+ )
1105
+ )
1106
+
1107
+ query_params["$alt"] = "json;enum-encoding=int"
1108
+ return query_params
1109
+
1110
+ class _BaseDeleteProperty:
1111
+ def __hash__(self): # pragma: NO COVER
1112
+ return NotImplementedError("__hash__ must be implemented.")
1113
+
1114
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1115
+
1116
+ @classmethod
1117
+ def _get_unset_required_fields(cls, message_dict):
1118
+ return {
1119
+ k: v
1120
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1121
+ if k not in message_dict
1122
+ }
1123
+
1124
+ @staticmethod
1125
+ def _get_http_options():
1126
+ http_options: List[Dict[str, str]] = [
1127
+ {
1128
+ "method": "delete",
1129
+ "uri": "/v1beta/{name=properties/*}",
1130
+ },
1131
+ ]
1132
+ return http_options
1133
+
1134
+ @staticmethod
1135
+ def _get_transcoded_request(http_options, request):
1136
+ pb_request = analytics_admin.DeletePropertyRequest.pb(request)
1137
+ transcoded_request = path_template.transcode(http_options, pb_request)
1138
+ return transcoded_request
1139
+
1140
+ @staticmethod
1141
+ def _get_query_params_json(transcoded_request):
1142
+ query_params = json.loads(
1143
+ json_format.MessageToJson(
1144
+ transcoded_request["query_params"],
1145
+ use_integers_for_enums=True,
1146
+ )
1147
+ )
1148
+ query_params.update(
1149
+ _BaseAnalyticsAdminServiceRestTransport._BaseDeleteProperty._get_unset_required_fields(
1150
+ query_params
1151
+ )
1152
+ )
1153
+
1154
+ query_params["$alt"] = "json;enum-encoding=int"
1155
+ return query_params
1156
+
1157
+ class _BaseGetAccount:
1158
+ def __hash__(self): # pragma: NO COVER
1159
+ return NotImplementedError("__hash__ must be implemented.")
1160
+
1161
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1162
+
1163
+ @classmethod
1164
+ def _get_unset_required_fields(cls, message_dict):
1165
+ return {
1166
+ k: v
1167
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1168
+ if k not in message_dict
1169
+ }
1170
+
1171
+ @staticmethod
1172
+ def _get_http_options():
1173
+ http_options: List[Dict[str, str]] = [
1174
+ {
1175
+ "method": "get",
1176
+ "uri": "/v1beta/{name=accounts/*}",
1177
+ },
1178
+ ]
1179
+ return http_options
1180
+
1181
+ @staticmethod
1182
+ def _get_transcoded_request(http_options, request):
1183
+ pb_request = analytics_admin.GetAccountRequest.pb(request)
1184
+ transcoded_request = path_template.transcode(http_options, pb_request)
1185
+ return transcoded_request
1186
+
1187
+ @staticmethod
1188
+ def _get_query_params_json(transcoded_request):
1189
+ query_params = json.loads(
1190
+ json_format.MessageToJson(
1191
+ transcoded_request["query_params"],
1192
+ use_integers_for_enums=True,
1193
+ )
1194
+ )
1195
+ query_params.update(
1196
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetAccount._get_unset_required_fields(
1197
+ query_params
1198
+ )
1199
+ )
1200
+
1201
+ query_params["$alt"] = "json;enum-encoding=int"
1202
+ return query_params
1203
+
1204
+ class _BaseGetConversionEvent:
1205
+ def __hash__(self): # pragma: NO COVER
1206
+ return NotImplementedError("__hash__ must be implemented.")
1207
+
1208
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1209
+
1210
+ @classmethod
1211
+ def _get_unset_required_fields(cls, message_dict):
1212
+ return {
1213
+ k: v
1214
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1215
+ if k not in message_dict
1216
+ }
1217
+
1218
+ @staticmethod
1219
+ def _get_http_options():
1220
+ http_options: List[Dict[str, str]] = [
1221
+ {
1222
+ "method": "get",
1223
+ "uri": "/v1beta/{name=properties/*/conversionEvents/*}",
1224
+ },
1225
+ ]
1226
+ return http_options
1227
+
1228
+ @staticmethod
1229
+ def _get_transcoded_request(http_options, request):
1230
+ pb_request = analytics_admin.GetConversionEventRequest.pb(request)
1231
+ transcoded_request = path_template.transcode(http_options, pb_request)
1232
+ return transcoded_request
1233
+
1234
+ @staticmethod
1235
+ def _get_query_params_json(transcoded_request):
1236
+ query_params = json.loads(
1237
+ json_format.MessageToJson(
1238
+ transcoded_request["query_params"],
1239
+ use_integers_for_enums=True,
1240
+ )
1241
+ )
1242
+ query_params.update(
1243
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetConversionEvent._get_unset_required_fields(
1244
+ query_params
1245
+ )
1246
+ )
1247
+
1248
+ query_params["$alt"] = "json;enum-encoding=int"
1249
+ return query_params
1250
+
1251
+ class _BaseGetCustomDimension:
1252
+ def __hash__(self): # pragma: NO COVER
1253
+ return NotImplementedError("__hash__ must be implemented.")
1254
+
1255
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1256
+
1257
+ @classmethod
1258
+ def _get_unset_required_fields(cls, message_dict):
1259
+ return {
1260
+ k: v
1261
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1262
+ if k not in message_dict
1263
+ }
1264
+
1265
+ @staticmethod
1266
+ def _get_http_options():
1267
+ http_options: List[Dict[str, str]] = [
1268
+ {
1269
+ "method": "get",
1270
+ "uri": "/v1beta/{name=properties/*/customDimensions/*}",
1271
+ },
1272
+ ]
1273
+ return http_options
1274
+
1275
+ @staticmethod
1276
+ def _get_transcoded_request(http_options, request):
1277
+ pb_request = analytics_admin.GetCustomDimensionRequest.pb(request)
1278
+ transcoded_request = path_template.transcode(http_options, pb_request)
1279
+ return transcoded_request
1280
+
1281
+ @staticmethod
1282
+ def _get_query_params_json(transcoded_request):
1283
+ query_params = json.loads(
1284
+ json_format.MessageToJson(
1285
+ transcoded_request["query_params"],
1286
+ use_integers_for_enums=True,
1287
+ )
1288
+ )
1289
+ query_params.update(
1290
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetCustomDimension._get_unset_required_fields(
1291
+ query_params
1292
+ )
1293
+ )
1294
+
1295
+ query_params["$alt"] = "json;enum-encoding=int"
1296
+ return query_params
1297
+
1298
+ class _BaseGetCustomMetric:
1299
+ def __hash__(self): # pragma: NO COVER
1300
+ return NotImplementedError("__hash__ must be implemented.")
1301
+
1302
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1303
+
1304
+ @classmethod
1305
+ def _get_unset_required_fields(cls, message_dict):
1306
+ return {
1307
+ k: v
1308
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1309
+ if k not in message_dict
1310
+ }
1311
+
1312
+ @staticmethod
1313
+ def _get_http_options():
1314
+ http_options: List[Dict[str, str]] = [
1315
+ {
1316
+ "method": "get",
1317
+ "uri": "/v1beta/{name=properties/*/customMetrics/*}",
1318
+ },
1319
+ ]
1320
+ return http_options
1321
+
1322
+ @staticmethod
1323
+ def _get_transcoded_request(http_options, request):
1324
+ pb_request = analytics_admin.GetCustomMetricRequest.pb(request)
1325
+ transcoded_request = path_template.transcode(http_options, pb_request)
1326
+ return transcoded_request
1327
+
1328
+ @staticmethod
1329
+ def _get_query_params_json(transcoded_request):
1330
+ query_params = json.loads(
1331
+ json_format.MessageToJson(
1332
+ transcoded_request["query_params"],
1333
+ use_integers_for_enums=True,
1334
+ )
1335
+ )
1336
+ query_params.update(
1337
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetCustomMetric._get_unset_required_fields(
1338
+ query_params
1339
+ )
1340
+ )
1341
+
1342
+ query_params["$alt"] = "json;enum-encoding=int"
1343
+ return query_params
1344
+
1345
+ class _BaseGetDataRetentionSettings:
1346
+ def __hash__(self): # pragma: NO COVER
1347
+ return NotImplementedError("__hash__ must be implemented.")
1348
+
1349
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1350
+
1351
+ @classmethod
1352
+ def _get_unset_required_fields(cls, message_dict):
1353
+ return {
1354
+ k: v
1355
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1356
+ if k not in message_dict
1357
+ }
1358
+
1359
+ @staticmethod
1360
+ def _get_http_options():
1361
+ http_options: List[Dict[str, str]] = [
1362
+ {
1363
+ "method": "get",
1364
+ "uri": "/v1beta/{name=properties/*/dataRetentionSettings}",
1365
+ },
1366
+ ]
1367
+ return http_options
1368
+
1369
+ @staticmethod
1370
+ def _get_transcoded_request(http_options, request):
1371
+ pb_request = analytics_admin.GetDataRetentionSettingsRequest.pb(request)
1372
+ transcoded_request = path_template.transcode(http_options, pb_request)
1373
+ return transcoded_request
1374
+
1375
+ @staticmethod
1376
+ def _get_query_params_json(transcoded_request):
1377
+ query_params = json.loads(
1378
+ json_format.MessageToJson(
1379
+ transcoded_request["query_params"],
1380
+ use_integers_for_enums=True,
1381
+ )
1382
+ )
1383
+ query_params.update(
1384
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetDataRetentionSettings._get_unset_required_fields(
1385
+ query_params
1386
+ )
1387
+ )
1388
+
1389
+ query_params["$alt"] = "json;enum-encoding=int"
1390
+ return query_params
1391
+
1392
+ class _BaseGetDataSharingSettings:
1393
+ def __hash__(self): # pragma: NO COVER
1394
+ return NotImplementedError("__hash__ must be implemented.")
1395
+
1396
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1397
+
1398
+ @classmethod
1399
+ def _get_unset_required_fields(cls, message_dict):
1400
+ return {
1401
+ k: v
1402
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1403
+ if k not in message_dict
1404
+ }
1405
+
1406
+ @staticmethod
1407
+ def _get_http_options():
1408
+ http_options: List[Dict[str, str]] = [
1409
+ {
1410
+ "method": "get",
1411
+ "uri": "/v1beta/{name=accounts/*/dataSharingSettings}",
1412
+ },
1413
+ ]
1414
+ return http_options
1415
+
1416
+ @staticmethod
1417
+ def _get_transcoded_request(http_options, request):
1418
+ pb_request = analytics_admin.GetDataSharingSettingsRequest.pb(request)
1419
+ transcoded_request = path_template.transcode(http_options, pb_request)
1420
+ return transcoded_request
1421
+
1422
+ @staticmethod
1423
+ def _get_query_params_json(transcoded_request):
1424
+ query_params = json.loads(
1425
+ json_format.MessageToJson(
1426
+ transcoded_request["query_params"],
1427
+ use_integers_for_enums=True,
1428
+ )
1429
+ )
1430
+ query_params.update(
1431
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetDataSharingSettings._get_unset_required_fields(
1432
+ query_params
1433
+ )
1434
+ )
1435
+
1436
+ query_params["$alt"] = "json;enum-encoding=int"
1437
+ return query_params
1438
+
1439
+ class _BaseGetDataStream:
1440
+ def __hash__(self): # pragma: NO COVER
1441
+ return NotImplementedError("__hash__ must be implemented.")
1442
+
1443
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1444
+
1445
+ @classmethod
1446
+ def _get_unset_required_fields(cls, message_dict):
1447
+ return {
1448
+ k: v
1449
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1450
+ if k not in message_dict
1451
+ }
1452
+
1453
+ @staticmethod
1454
+ def _get_http_options():
1455
+ http_options: List[Dict[str, str]] = [
1456
+ {
1457
+ "method": "get",
1458
+ "uri": "/v1beta/{name=properties/*/dataStreams/*}",
1459
+ },
1460
+ ]
1461
+ return http_options
1462
+
1463
+ @staticmethod
1464
+ def _get_transcoded_request(http_options, request):
1465
+ pb_request = analytics_admin.GetDataStreamRequest.pb(request)
1466
+ transcoded_request = path_template.transcode(http_options, pb_request)
1467
+ return transcoded_request
1468
+
1469
+ @staticmethod
1470
+ def _get_query_params_json(transcoded_request):
1471
+ query_params = json.loads(
1472
+ json_format.MessageToJson(
1473
+ transcoded_request["query_params"],
1474
+ use_integers_for_enums=True,
1475
+ )
1476
+ )
1477
+ query_params.update(
1478
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetDataStream._get_unset_required_fields(
1479
+ query_params
1480
+ )
1481
+ )
1482
+
1483
+ query_params["$alt"] = "json;enum-encoding=int"
1484
+ return query_params
1485
+
1486
+ class _BaseGetKeyEvent:
1487
+ def __hash__(self): # pragma: NO COVER
1488
+ return NotImplementedError("__hash__ must be implemented.")
1489
+
1490
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1491
+
1492
+ @classmethod
1493
+ def _get_unset_required_fields(cls, message_dict):
1494
+ return {
1495
+ k: v
1496
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1497
+ if k not in message_dict
1498
+ }
1499
+
1500
+ @staticmethod
1501
+ def _get_http_options():
1502
+ http_options: List[Dict[str, str]] = [
1503
+ {
1504
+ "method": "get",
1505
+ "uri": "/v1beta/{name=properties/*/keyEvents/*}",
1506
+ },
1507
+ ]
1508
+ return http_options
1509
+
1510
+ @staticmethod
1511
+ def _get_transcoded_request(http_options, request):
1512
+ pb_request = analytics_admin.GetKeyEventRequest.pb(request)
1513
+ transcoded_request = path_template.transcode(http_options, pb_request)
1514
+ return transcoded_request
1515
+
1516
+ @staticmethod
1517
+ def _get_query_params_json(transcoded_request):
1518
+ query_params = json.loads(
1519
+ json_format.MessageToJson(
1520
+ transcoded_request["query_params"],
1521
+ use_integers_for_enums=True,
1522
+ )
1523
+ )
1524
+ query_params.update(
1525
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetKeyEvent._get_unset_required_fields(
1526
+ query_params
1527
+ )
1528
+ )
1529
+
1530
+ query_params["$alt"] = "json;enum-encoding=int"
1531
+ return query_params
1532
+
1533
+ class _BaseGetMeasurementProtocolSecret:
1534
+ def __hash__(self): # pragma: NO COVER
1535
+ return NotImplementedError("__hash__ must be implemented.")
1536
+
1537
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1538
+
1539
+ @classmethod
1540
+ def _get_unset_required_fields(cls, message_dict):
1541
+ return {
1542
+ k: v
1543
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1544
+ if k not in message_dict
1545
+ }
1546
+
1547
+ @staticmethod
1548
+ def _get_http_options():
1549
+ http_options: List[Dict[str, str]] = [
1550
+ {
1551
+ "method": "get",
1552
+ "uri": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}",
1553
+ },
1554
+ ]
1555
+ return http_options
1556
+
1557
+ @staticmethod
1558
+ def _get_transcoded_request(http_options, request):
1559
+ pb_request = analytics_admin.GetMeasurementProtocolSecretRequest.pb(request)
1560
+ transcoded_request = path_template.transcode(http_options, pb_request)
1561
+ return transcoded_request
1562
+
1563
+ @staticmethod
1564
+ def _get_query_params_json(transcoded_request):
1565
+ query_params = json.loads(
1566
+ json_format.MessageToJson(
1567
+ transcoded_request["query_params"],
1568
+ use_integers_for_enums=True,
1569
+ )
1570
+ )
1571
+ query_params.update(
1572
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetMeasurementProtocolSecret._get_unset_required_fields(
1573
+ query_params
1574
+ )
1575
+ )
1576
+
1577
+ query_params["$alt"] = "json;enum-encoding=int"
1578
+ return query_params
1579
+
1580
+ class _BaseGetProperty:
1581
+ def __hash__(self): # pragma: NO COVER
1582
+ return NotImplementedError("__hash__ must be implemented.")
1583
+
1584
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1585
+
1586
+ @classmethod
1587
+ def _get_unset_required_fields(cls, message_dict):
1588
+ return {
1589
+ k: v
1590
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1591
+ if k not in message_dict
1592
+ }
1593
+
1594
+ @staticmethod
1595
+ def _get_http_options():
1596
+ http_options: List[Dict[str, str]] = [
1597
+ {
1598
+ "method": "get",
1599
+ "uri": "/v1beta/{name=properties/*}",
1600
+ },
1601
+ ]
1602
+ return http_options
1603
+
1604
+ @staticmethod
1605
+ def _get_transcoded_request(http_options, request):
1606
+ pb_request = analytics_admin.GetPropertyRequest.pb(request)
1607
+ transcoded_request = path_template.transcode(http_options, pb_request)
1608
+ return transcoded_request
1609
+
1610
+ @staticmethod
1611
+ def _get_query_params_json(transcoded_request):
1612
+ query_params = json.loads(
1613
+ json_format.MessageToJson(
1614
+ transcoded_request["query_params"],
1615
+ use_integers_for_enums=True,
1616
+ )
1617
+ )
1618
+ query_params.update(
1619
+ _BaseAnalyticsAdminServiceRestTransport._BaseGetProperty._get_unset_required_fields(
1620
+ query_params
1621
+ )
1622
+ )
1623
+
1624
+ query_params["$alt"] = "json;enum-encoding=int"
1625
+ return query_params
1626
+
1627
+ class _BaseListAccounts:
1628
+ def __hash__(self): # pragma: NO COVER
1629
+ return NotImplementedError("__hash__ must be implemented.")
1630
+
1631
+ @staticmethod
1632
+ def _get_http_options():
1633
+ http_options: List[Dict[str, str]] = [
1634
+ {
1635
+ "method": "get",
1636
+ "uri": "/v1beta/accounts",
1637
+ },
1638
+ ]
1639
+ return http_options
1640
+
1641
+ @staticmethod
1642
+ def _get_transcoded_request(http_options, request):
1643
+ pb_request = analytics_admin.ListAccountsRequest.pb(request)
1644
+ transcoded_request = path_template.transcode(http_options, pb_request)
1645
+ return transcoded_request
1646
+
1647
+ @staticmethod
1648
+ def _get_query_params_json(transcoded_request):
1649
+ query_params = json.loads(
1650
+ json_format.MessageToJson(
1651
+ transcoded_request["query_params"],
1652
+ use_integers_for_enums=True,
1653
+ )
1654
+ )
1655
+
1656
+ query_params["$alt"] = "json;enum-encoding=int"
1657
+ return query_params
1658
+
1659
+ class _BaseListAccountSummaries:
1660
+ def __hash__(self): # pragma: NO COVER
1661
+ return NotImplementedError("__hash__ must be implemented.")
1662
+
1663
+ @staticmethod
1664
+ def _get_http_options():
1665
+ http_options: List[Dict[str, str]] = [
1666
+ {
1667
+ "method": "get",
1668
+ "uri": "/v1beta/accountSummaries",
1669
+ },
1670
+ ]
1671
+ return http_options
1672
+
1673
+ @staticmethod
1674
+ def _get_transcoded_request(http_options, request):
1675
+ pb_request = analytics_admin.ListAccountSummariesRequest.pb(request)
1676
+ transcoded_request = path_template.transcode(http_options, pb_request)
1677
+ return transcoded_request
1678
+
1679
+ @staticmethod
1680
+ def _get_query_params_json(transcoded_request):
1681
+ query_params = json.loads(
1682
+ json_format.MessageToJson(
1683
+ transcoded_request["query_params"],
1684
+ use_integers_for_enums=True,
1685
+ )
1686
+ )
1687
+
1688
+ query_params["$alt"] = "json;enum-encoding=int"
1689
+ return query_params
1690
+
1691
+ class _BaseListConversionEvents:
1692
+ def __hash__(self): # pragma: NO COVER
1693
+ return NotImplementedError("__hash__ must be implemented.")
1694
+
1695
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1696
+
1697
+ @classmethod
1698
+ def _get_unset_required_fields(cls, message_dict):
1699
+ return {
1700
+ k: v
1701
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1702
+ if k not in message_dict
1703
+ }
1704
+
1705
+ @staticmethod
1706
+ def _get_http_options():
1707
+ http_options: List[Dict[str, str]] = [
1708
+ {
1709
+ "method": "get",
1710
+ "uri": "/v1beta/{parent=properties/*}/conversionEvents",
1711
+ },
1712
+ ]
1713
+ return http_options
1714
+
1715
+ @staticmethod
1716
+ def _get_transcoded_request(http_options, request):
1717
+ pb_request = analytics_admin.ListConversionEventsRequest.pb(request)
1718
+ transcoded_request = path_template.transcode(http_options, pb_request)
1719
+ return transcoded_request
1720
+
1721
+ @staticmethod
1722
+ def _get_query_params_json(transcoded_request):
1723
+ query_params = json.loads(
1724
+ json_format.MessageToJson(
1725
+ transcoded_request["query_params"],
1726
+ use_integers_for_enums=True,
1727
+ )
1728
+ )
1729
+ query_params.update(
1730
+ _BaseAnalyticsAdminServiceRestTransport._BaseListConversionEvents._get_unset_required_fields(
1731
+ query_params
1732
+ )
1733
+ )
1734
+
1735
+ query_params["$alt"] = "json;enum-encoding=int"
1736
+ return query_params
1737
+
1738
+ class _BaseListCustomDimensions:
1739
+ def __hash__(self): # pragma: NO COVER
1740
+ return NotImplementedError("__hash__ must be implemented.")
1741
+
1742
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1743
+
1744
+ @classmethod
1745
+ def _get_unset_required_fields(cls, message_dict):
1746
+ return {
1747
+ k: v
1748
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1749
+ if k not in message_dict
1750
+ }
1751
+
1752
+ @staticmethod
1753
+ def _get_http_options():
1754
+ http_options: List[Dict[str, str]] = [
1755
+ {
1756
+ "method": "get",
1757
+ "uri": "/v1beta/{parent=properties/*}/customDimensions",
1758
+ },
1759
+ ]
1760
+ return http_options
1761
+
1762
+ @staticmethod
1763
+ def _get_transcoded_request(http_options, request):
1764
+ pb_request = analytics_admin.ListCustomDimensionsRequest.pb(request)
1765
+ transcoded_request = path_template.transcode(http_options, pb_request)
1766
+ return transcoded_request
1767
+
1768
+ @staticmethod
1769
+ def _get_query_params_json(transcoded_request):
1770
+ query_params = json.loads(
1771
+ json_format.MessageToJson(
1772
+ transcoded_request["query_params"],
1773
+ use_integers_for_enums=True,
1774
+ )
1775
+ )
1776
+ query_params.update(
1777
+ _BaseAnalyticsAdminServiceRestTransport._BaseListCustomDimensions._get_unset_required_fields(
1778
+ query_params
1779
+ )
1780
+ )
1781
+
1782
+ query_params["$alt"] = "json;enum-encoding=int"
1783
+ return query_params
1784
+
1785
+ class _BaseListCustomMetrics:
1786
+ def __hash__(self): # pragma: NO COVER
1787
+ return NotImplementedError("__hash__ must be implemented.")
1788
+
1789
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1790
+
1791
+ @classmethod
1792
+ def _get_unset_required_fields(cls, message_dict):
1793
+ return {
1794
+ k: v
1795
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1796
+ if k not in message_dict
1797
+ }
1798
+
1799
+ @staticmethod
1800
+ def _get_http_options():
1801
+ http_options: List[Dict[str, str]] = [
1802
+ {
1803
+ "method": "get",
1804
+ "uri": "/v1beta/{parent=properties/*}/customMetrics",
1805
+ },
1806
+ ]
1807
+ return http_options
1808
+
1809
+ @staticmethod
1810
+ def _get_transcoded_request(http_options, request):
1811
+ pb_request = analytics_admin.ListCustomMetricsRequest.pb(request)
1812
+ transcoded_request = path_template.transcode(http_options, pb_request)
1813
+ return transcoded_request
1814
+
1815
+ @staticmethod
1816
+ def _get_query_params_json(transcoded_request):
1817
+ query_params = json.loads(
1818
+ json_format.MessageToJson(
1819
+ transcoded_request["query_params"],
1820
+ use_integers_for_enums=True,
1821
+ )
1822
+ )
1823
+ query_params.update(
1824
+ _BaseAnalyticsAdminServiceRestTransport._BaseListCustomMetrics._get_unset_required_fields(
1825
+ query_params
1826
+ )
1827
+ )
1828
+
1829
+ query_params["$alt"] = "json;enum-encoding=int"
1830
+ return query_params
1831
+
1832
+ class _BaseListDataStreams:
1833
+ def __hash__(self): # pragma: NO COVER
1834
+ return NotImplementedError("__hash__ must be implemented.")
1835
+
1836
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1837
+
1838
+ @classmethod
1839
+ def _get_unset_required_fields(cls, message_dict):
1840
+ return {
1841
+ k: v
1842
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1843
+ if k not in message_dict
1844
+ }
1845
+
1846
+ @staticmethod
1847
+ def _get_http_options():
1848
+ http_options: List[Dict[str, str]] = [
1849
+ {
1850
+ "method": "get",
1851
+ "uri": "/v1beta/{parent=properties/*}/dataStreams",
1852
+ },
1853
+ ]
1854
+ return http_options
1855
+
1856
+ @staticmethod
1857
+ def _get_transcoded_request(http_options, request):
1858
+ pb_request = analytics_admin.ListDataStreamsRequest.pb(request)
1859
+ transcoded_request = path_template.transcode(http_options, pb_request)
1860
+ return transcoded_request
1861
+
1862
+ @staticmethod
1863
+ def _get_query_params_json(transcoded_request):
1864
+ query_params = json.loads(
1865
+ json_format.MessageToJson(
1866
+ transcoded_request["query_params"],
1867
+ use_integers_for_enums=True,
1868
+ )
1869
+ )
1870
+ query_params.update(
1871
+ _BaseAnalyticsAdminServiceRestTransport._BaseListDataStreams._get_unset_required_fields(
1872
+ query_params
1873
+ )
1874
+ )
1875
+
1876
+ query_params["$alt"] = "json;enum-encoding=int"
1877
+ return query_params
1878
+
1879
+ class _BaseListFirebaseLinks:
1880
+ def __hash__(self): # pragma: NO COVER
1881
+ return NotImplementedError("__hash__ must be implemented.")
1882
+
1883
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1884
+
1885
+ @classmethod
1886
+ def _get_unset_required_fields(cls, message_dict):
1887
+ return {
1888
+ k: v
1889
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1890
+ if k not in message_dict
1891
+ }
1892
+
1893
+ @staticmethod
1894
+ def _get_http_options():
1895
+ http_options: List[Dict[str, str]] = [
1896
+ {
1897
+ "method": "get",
1898
+ "uri": "/v1beta/{parent=properties/*}/firebaseLinks",
1899
+ },
1900
+ ]
1901
+ return http_options
1902
+
1903
+ @staticmethod
1904
+ def _get_transcoded_request(http_options, request):
1905
+ pb_request = analytics_admin.ListFirebaseLinksRequest.pb(request)
1906
+ transcoded_request = path_template.transcode(http_options, pb_request)
1907
+ return transcoded_request
1908
+
1909
+ @staticmethod
1910
+ def _get_query_params_json(transcoded_request):
1911
+ query_params = json.loads(
1912
+ json_format.MessageToJson(
1913
+ transcoded_request["query_params"],
1914
+ use_integers_for_enums=True,
1915
+ )
1916
+ )
1917
+ query_params.update(
1918
+ _BaseAnalyticsAdminServiceRestTransport._BaseListFirebaseLinks._get_unset_required_fields(
1919
+ query_params
1920
+ )
1921
+ )
1922
+
1923
+ query_params["$alt"] = "json;enum-encoding=int"
1924
+ return query_params
1925
+
1926
+ class _BaseListGoogleAdsLinks:
1927
+ def __hash__(self): # pragma: NO COVER
1928
+ return NotImplementedError("__hash__ must be implemented.")
1929
+
1930
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1931
+
1932
+ @classmethod
1933
+ def _get_unset_required_fields(cls, message_dict):
1934
+ return {
1935
+ k: v
1936
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1937
+ if k not in message_dict
1938
+ }
1939
+
1940
+ @staticmethod
1941
+ def _get_http_options():
1942
+ http_options: List[Dict[str, str]] = [
1943
+ {
1944
+ "method": "get",
1945
+ "uri": "/v1beta/{parent=properties/*}/googleAdsLinks",
1946
+ },
1947
+ ]
1948
+ return http_options
1949
+
1950
+ @staticmethod
1951
+ def _get_transcoded_request(http_options, request):
1952
+ pb_request = analytics_admin.ListGoogleAdsLinksRequest.pb(request)
1953
+ transcoded_request = path_template.transcode(http_options, pb_request)
1954
+ return transcoded_request
1955
+
1956
+ @staticmethod
1957
+ def _get_query_params_json(transcoded_request):
1958
+ query_params = json.loads(
1959
+ json_format.MessageToJson(
1960
+ transcoded_request["query_params"],
1961
+ use_integers_for_enums=True,
1962
+ )
1963
+ )
1964
+ query_params.update(
1965
+ _BaseAnalyticsAdminServiceRestTransport._BaseListGoogleAdsLinks._get_unset_required_fields(
1966
+ query_params
1967
+ )
1968
+ )
1969
+
1970
+ query_params["$alt"] = "json;enum-encoding=int"
1971
+ return query_params
1972
+
1973
+ class _BaseListKeyEvents:
1974
+ def __hash__(self): # pragma: NO COVER
1975
+ return NotImplementedError("__hash__ must be implemented.")
1976
+
1977
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1978
+
1979
+ @classmethod
1980
+ def _get_unset_required_fields(cls, message_dict):
1981
+ return {
1982
+ k: v
1983
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1984
+ if k not in message_dict
1985
+ }
1986
+
1987
+ @staticmethod
1988
+ def _get_http_options():
1989
+ http_options: List[Dict[str, str]] = [
1990
+ {
1991
+ "method": "get",
1992
+ "uri": "/v1beta/{parent=properties/*}/keyEvents",
1993
+ },
1994
+ ]
1995
+ return http_options
1996
+
1997
+ @staticmethod
1998
+ def _get_transcoded_request(http_options, request):
1999
+ pb_request = analytics_admin.ListKeyEventsRequest.pb(request)
2000
+ transcoded_request = path_template.transcode(http_options, pb_request)
2001
+ return transcoded_request
2002
+
2003
+ @staticmethod
2004
+ def _get_query_params_json(transcoded_request):
2005
+ query_params = json.loads(
2006
+ json_format.MessageToJson(
2007
+ transcoded_request["query_params"],
2008
+ use_integers_for_enums=True,
2009
+ )
2010
+ )
2011
+ query_params.update(
2012
+ _BaseAnalyticsAdminServiceRestTransport._BaseListKeyEvents._get_unset_required_fields(
2013
+ query_params
2014
+ )
2015
+ )
2016
+
2017
+ query_params["$alt"] = "json;enum-encoding=int"
2018
+ return query_params
2019
+
2020
+ class _BaseListMeasurementProtocolSecrets:
2021
+ def __hash__(self): # pragma: NO COVER
2022
+ return NotImplementedError("__hash__ must be implemented.")
2023
+
2024
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
2025
+
2026
+ @classmethod
2027
+ def _get_unset_required_fields(cls, message_dict):
2028
+ return {
2029
+ k: v
2030
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2031
+ if k not in message_dict
2032
+ }
2033
+
2034
+ @staticmethod
2035
+ def _get_http_options():
2036
+ http_options: List[Dict[str, str]] = [
2037
+ {
2038
+ "method": "get",
2039
+ "uri": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets",
2040
+ },
2041
+ ]
2042
+ return http_options
2043
+
2044
+ @staticmethod
2045
+ def _get_transcoded_request(http_options, request):
2046
+ pb_request = analytics_admin.ListMeasurementProtocolSecretsRequest.pb(
2047
+ request
2048
+ )
2049
+ transcoded_request = path_template.transcode(http_options, pb_request)
2050
+ return transcoded_request
2051
+
2052
+ @staticmethod
2053
+ def _get_query_params_json(transcoded_request):
2054
+ query_params = json.loads(
2055
+ json_format.MessageToJson(
2056
+ transcoded_request["query_params"],
2057
+ use_integers_for_enums=True,
2058
+ )
2059
+ )
2060
+ query_params.update(
2061
+ _BaseAnalyticsAdminServiceRestTransport._BaseListMeasurementProtocolSecrets._get_unset_required_fields(
2062
+ query_params
2063
+ )
2064
+ )
2065
+
2066
+ query_params["$alt"] = "json;enum-encoding=int"
2067
+ return query_params
2068
+
2069
+ class _BaseListProperties:
2070
+ def __hash__(self): # pragma: NO COVER
2071
+ return NotImplementedError("__hash__ must be implemented.")
2072
+
2073
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2074
+ "filter": "",
2075
+ }
2076
+
2077
+ @classmethod
2078
+ def _get_unset_required_fields(cls, message_dict):
2079
+ return {
2080
+ k: v
2081
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2082
+ if k not in message_dict
2083
+ }
2084
+
2085
+ @staticmethod
2086
+ def _get_http_options():
2087
+ http_options: List[Dict[str, str]] = [
2088
+ {
2089
+ "method": "get",
2090
+ "uri": "/v1beta/properties",
2091
+ },
2092
+ ]
2093
+ return http_options
2094
+
2095
+ @staticmethod
2096
+ def _get_transcoded_request(http_options, request):
2097
+ pb_request = analytics_admin.ListPropertiesRequest.pb(request)
2098
+ transcoded_request = path_template.transcode(http_options, pb_request)
2099
+ return transcoded_request
2100
+
2101
+ @staticmethod
2102
+ def _get_query_params_json(transcoded_request):
2103
+ query_params = json.loads(
2104
+ json_format.MessageToJson(
2105
+ transcoded_request["query_params"],
2106
+ use_integers_for_enums=True,
2107
+ )
2108
+ )
2109
+ query_params.update(
2110
+ _BaseAnalyticsAdminServiceRestTransport._BaseListProperties._get_unset_required_fields(
2111
+ query_params
2112
+ )
2113
+ )
2114
+
2115
+ query_params["$alt"] = "json;enum-encoding=int"
2116
+ return query_params
2117
+
2118
+ class _BaseProvisionAccountTicket:
2119
+ def __hash__(self): # pragma: NO COVER
2120
+ return NotImplementedError("__hash__ must be implemented.")
2121
+
2122
+ @staticmethod
2123
+ def _get_http_options():
2124
+ http_options: List[Dict[str, str]] = [
2125
+ {
2126
+ "method": "post",
2127
+ "uri": "/v1beta/accounts:provisionAccountTicket",
2128
+ "body": "*",
2129
+ },
2130
+ ]
2131
+ return http_options
2132
+
2133
+ @staticmethod
2134
+ def _get_transcoded_request(http_options, request):
2135
+ pb_request = analytics_admin.ProvisionAccountTicketRequest.pb(request)
2136
+ transcoded_request = path_template.transcode(http_options, pb_request)
2137
+ return transcoded_request
2138
+
2139
+ @staticmethod
2140
+ def _get_request_body_json(transcoded_request):
2141
+ # Jsonify the request body
2142
+
2143
+ body = json_format.MessageToJson(
2144
+ transcoded_request["body"], use_integers_for_enums=True
2145
+ )
2146
+ return body
2147
+
2148
+ @staticmethod
2149
+ def _get_query_params_json(transcoded_request):
2150
+ query_params = json.loads(
2151
+ json_format.MessageToJson(
2152
+ transcoded_request["query_params"],
2153
+ use_integers_for_enums=True,
2154
+ )
2155
+ )
2156
+
2157
+ query_params["$alt"] = "json;enum-encoding=int"
2158
+ return query_params
2159
+
2160
+ class _BaseRunAccessReport:
2161
+ def __hash__(self): # pragma: NO COVER
2162
+ return NotImplementedError("__hash__ must be implemented.")
2163
+
2164
+ @staticmethod
2165
+ def _get_http_options():
2166
+ http_options: List[Dict[str, str]] = [
2167
+ {
2168
+ "method": "post",
2169
+ "uri": "/v1beta/{entity=properties/*}:runAccessReport",
2170
+ "body": "*",
2171
+ },
2172
+ {
2173
+ "method": "post",
2174
+ "uri": "/v1beta/{entity=accounts/*}:runAccessReport",
2175
+ "body": "*",
2176
+ },
2177
+ ]
2178
+ return http_options
2179
+
2180
+ @staticmethod
2181
+ def _get_transcoded_request(http_options, request):
2182
+ pb_request = analytics_admin.RunAccessReportRequest.pb(request)
2183
+ transcoded_request = path_template.transcode(http_options, pb_request)
2184
+ return transcoded_request
2185
+
2186
+ @staticmethod
2187
+ def _get_request_body_json(transcoded_request):
2188
+ # Jsonify the request body
2189
+
2190
+ body = json_format.MessageToJson(
2191
+ transcoded_request["body"], use_integers_for_enums=True
2192
+ )
2193
+ return body
2194
+
2195
+ @staticmethod
2196
+ def _get_query_params_json(transcoded_request):
2197
+ query_params = json.loads(
2198
+ json_format.MessageToJson(
2199
+ transcoded_request["query_params"],
2200
+ use_integers_for_enums=True,
2201
+ )
2202
+ )
2203
+
2204
+ query_params["$alt"] = "json;enum-encoding=int"
2205
+ return query_params
2206
+
2207
+ class _BaseSearchChangeHistoryEvents:
2208
+ def __hash__(self): # pragma: NO COVER
2209
+ return NotImplementedError("__hash__ must be implemented.")
2210
+
2211
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
2212
+
2213
+ @classmethod
2214
+ def _get_unset_required_fields(cls, message_dict):
2215
+ return {
2216
+ k: v
2217
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2218
+ if k not in message_dict
2219
+ }
2220
+
2221
+ @staticmethod
2222
+ def _get_http_options():
2223
+ http_options: List[Dict[str, str]] = [
2224
+ {
2225
+ "method": "post",
2226
+ "uri": "/v1beta/{account=accounts/*}:searchChangeHistoryEvents",
2227
+ "body": "*",
2228
+ },
2229
+ ]
2230
+ return http_options
2231
+
2232
+ @staticmethod
2233
+ def _get_transcoded_request(http_options, request):
2234
+ pb_request = analytics_admin.SearchChangeHistoryEventsRequest.pb(request)
2235
+ transcoded_request = path_template.transcode(http_options, pb_request)
2236
+ return transcoded_request
2237
+
2238
+ @staticmethod
2239
+ def _get_request_body_json(transcoded_request):
2240
+ # Jsonify the request body
2241
+
2242
+ body = json_format.MessageToJson(
2243
+ transcoded_request["body"], use_integers_for_enums=True
2244
+ )
2245
+ return body
2246
+
2247
+ @staticmethod
2248
+ def _get_query_params_json(transcoded_request):
2249
+ query_params = json.loads(
2250
+ json_format.MessageToJson(
2251
+ transcoded_request["query_params"],
2252
+ use_integers_for_enums=True,
2253
+ )
2254
+ )
2255
+ query_params.update(
2256
+ _BaseAnalyticsAdminServiceRestTransport._BaseSearchChangeHistoryEvents._get_unset_required_fields(
2257
+ query_params
2258
+ )
2259
+ )
2260
+
2261
+ query_params["$alt"] = "json;enum-encoding=int"
2262
+ return query_params
2263
+
2264
+ class _BaseUpdateAccount:
2265
+ def __hash__(self): # pragma: NO COVER
2266
+ return NotImplementedError("__hash__ must be implemented.")
2267
+
2268
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2269
+ "updateMask": {},
2270
+ }
2271
+
2272
+ @classmethod
2273
+ def _get_unset_required_fields(cls, message_dict):
2274
+ return {
2275
+ k: v
2276
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2277
+ if k not in message_dict
2278
+ }
2279
+
2280
+ @staticmethod
2281
+ def _get_http_options():
2282
+ http_options: List[Dict[str, str]] = [
2283
+ {
2284
+ "method": "patch",
2285
+ "uri": "/v1beta/{account.name=accounts/*}",
2286
+ "body": "account",
2287
+ },
2288
+ ]
2289
+ return http_options
2290
+
2291
+ @staticmethod
2292
+ def _get_transcoded_request(http_options, request):
2293
+ pb_request = analytics_admin.UpdateAccountRequest.pb(request)
2294
+ transcoded_request = path_template.transcode(http_options, pb_request)
2295
+ return transcoded_request
2296
+
2297
+ @staticmethod
2298
+ def _get_request_body_json(transcoded_request):
2299
+ # Jsonify the request body
2300
+
2301
+ body = json_format.MessageToJson(
2302
+ transcoded_request["body"], use_integers_for_enums=True
2303
+ )
2304
+ return body
2305
+
2306
+ @staticmethod
2307
+ def _get_query_params_json(transcoded_request):
2308
+ query_params = json.loads(
2309
+ json_format.MessageToJson(
2310
+ transcoded_request["query_params"],
2311
+ use_integers_for_enums=True,
2312
+ )
2313
+ )
2314
+ query_params.update(
2315
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateAccount._get_unset_required_fields(
2316
+ query_params
2317
+ )
2318
+ )
2319
+
2320
+ query_params["$alt"] = "json;enum-encoding=int"
2321
+ return query_params
2322
+
2323
+ class _BaseUpdateConversionEvent:
2324
+ def __hash__(self): # pragma: NO COVER
2325
+ return NotImplementedError("__hash__ must be implemented.")
2326
+
2327
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2328
+ "updateMask": {},
2329
+ }
2330
+
2331
+ @classmethod
2332
+ def _get_unset_required_fields(cls, message_dict):
2333
+ return {
2334
+ k: v
2335
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2336
+ if k not in message_dict
2337
+ }
2338
+
2339
+ @staticmethod
2340
+ def _get_http_options():
2341
+ http_options: List[Dict[str, str]] = [
2342
+ {
2343
+ "method": "patch",
2344
+ "uri": "/v1beta/{conversion_event.name=properties/*/conversionEvents/*}",
2345
+ "body": "conversion_event",
2346
+ },
2347
+ ]
2348
+ return http_options
2349
+
2350
+ @staticmethod
2351
+ def _get_transcoded_request(http_options, request):
2352
+ pb_request = analytics_admin.UpdateConversionEventRequest.pb(request)
2353
+ transcoded_request = path_template.transcode(http_options, pb_request)
2354
+ return transcoded_request
2355
+
2356
+ @staticmethod
2357
+ def _get_request_body_json(transcoded_request):
2358
+ # Jsonify the request body
2359
+
2360
+ body = json_format.MessageToJson(
2361
+ transcoded_request["body"], use_integers_for_enums=True
2362
+ )
2363
+ return body
2364
+
2365
+ @staticmethod
2366
+ def _get_query_params_json(transcoded_request):
2367
+ query_params = json.loads(
2368
+ json_format.MessageToJson(
2369
+ transcoded_request["query_params"],
2370
+ use_integers_for_enums=True,
2371
+ )
2372
+ )
2373
+ query_params.update(
2374
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateConversionEvent._get_unset_required_fields(
2375
+ query_params
2376
+ )
2377
+ )
2378
+
2379
+ query_params["$alt"] = "json;enum-encoding=int"
2380
+ return query_params
2381
+
2382
+ class _BaseUpdateCustomDimension:
2383
+ def __hash__(self): # pragma: NO COVER
2384
+ return NotImplementedError("__hash__ must be implemented.")
2385
+
2386
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2387
+ "updateMask": {},
2388
+ }
2389
+
2390
+ @classmethod
2391
+ def _get_unset_required_fields(cls, message_dict):
2392
+ return {
2393
+ k: v
2394
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2395
+ if k not in message_dict
2396
+ }
2397
+
2398
+ @staticmethod
2399
+ def _get_http_options():
2400
+ http_options: List[Dict[str, str]] = [
2401
+ {
2402
+ "method": "patch",
2403
+ "uri": "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}",
2404
+ "body": "custom_dimension",
2405
+ },
2406
+ ]
2407
+ return http_options
2408
+
2409
+ @staticmethod
2410
+ def _get_transcoded_request(http_options, request):
2411
+ pb_request = analytics_admin.UpdateCustomDimensionRequest.pb(request)
2412
+ transcoded_request = path_template.transcode(http_options, pb_request)
2413
+ return transcoded_request
2414
+
2415
+ @staticmethod
2416
+ def _get_request_body_json(transcoded_request):
2417
+ # Jsonify the request body
2418
+
2419
+ body = json_format.MessageToJson(
2420
+ transcoded_request["body"], use_integers_for_enums=True
2421
+ )
2422
+ return body
2423
+
2424
+ @staticmethod
2425
+ def _get_query_params_json(transcoded_request):
2426
+ query_params = json.loads(
2427
+ json_format.MessageToJson(
2428
+ transcoded_request["query_params"],
2429
+ use_integers_for_enums=True,
2430
+ )
2431
+ )
2432
+ query_params.update(
2433
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateCustomDimension._get_unset_required_fields(
2434
+ query_params
2435
+ )
2436
+ )
2437
+
2438
+ query_params["$alt"] = "json;enum-encoding=int"
2439
+ return query_params
2440
+
2441
+ class _BaseUpdateCustomMetric:
2442
+ def __hash__(self): # pragma: NO COVER
2443
+ return NotImplementedError("__hash__ must be implemented.")
2444
+
2445
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2446
+ "updateMask": {},
2447
+ }
2448
+
2449
+ @classmethod
2450
+ def _get_unset_required_fields(cls, message_dict):
2451
+ return {
2452
+ k: v
2453
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2454
+ if k not in message_dict
2455
+ }
2456
+
2457
+ @staticmethod
2458
+ def _get_http_options():
2459
+ http_options: List[Dict[str, str]] = [
2460
+ {
2461
+ "method": "patch",
2462
+ "uri": "/v1beta/{custom_metric.name=properties/*/customMetrics/*}",
2463
+ "body": "custom_metric",
2464
+ },
2465
+ ]
2466
+ return http_options
2467
+
2468
+ @staticmethod
2469
+ def _get_transcoded_request(http_options, request):
2470
+ pb_request = analytics_admin.UpdateCustomMetricRequest.pb(request)
2471
+ transcoded_request = path_template.transcode(http_options, pb_request)
2472
+ return transcoded_request
2473
+
2474
+ @staticmethod
2475
+ def _get_request_body_json(transcoded_request):
2476
+ # Jsonify the request body
2477
+
2478
+ body = json_format.MessageToJson(
2479
+ transcoded_request["body"], use_integers_for_enums=True
2480
+ )
2481
+ return body
2482
+
2483
+ @staticmethod
2484
+ def _get_query_params_json(transcoded_request):
2485
+ query_params = json.loads(
2486
+ json_format.MessageToJson(
2487
+ transcoded_request["query_params"],
2488
+ use_integers_for_enums=True,
2489
+ )
2490
+ )
2491
+ query_params.update(
2492
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateCustomMetric._get_unset_required_fields(
2493
+ query_params
2494
+ )
2495
+ )
2496
+
2497
+ query_params["$alt"] = "json;enum-encoding=int"
2498
+ return query_params
2499
+
2500
+ class _BaseUpdateDataRetentionSettings:
2501
+ def __hash__(self): # pragma: NO COVER
2502
+ return NotImplementedError("__hash__ must be implemented.")
2503
+
2504
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2505
+ "updateMask": {},
2506
+ }
2507
+
2508
+ @classmethod
2509
+ def _get_unset_required_fields(cls, message_dict):
2510
+ return {
2511
+ k: v
2512
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2513
+ if k not in message_dict
2514
+ }
2515
+
2516
+ @staticmethod
2517
+ def _get_http_options():
2518
+ http_options: List[Dict[str, str]] = [
2519
+ {
2520
+ "method": "patch",
2521
+ "uri": "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}",
2522
+ "body": "data_retention_settings",
2523
+ },
2524
+ ]
2525
+ return http_options
2526
+
2527
+ @staticmethod
2528
+ def _get_transcoded_request(http_options, request):
2529
+ pb_request = analytics_admin.UpdateDataRetentionSettingsRequest.pb(request)
2530
+ transcoded_request = path_template.transcode(http_options, pb_request)
2531
+ return transcoded_request
2532
+
2533
+ @staticmethod
2534
+ def _get_request_body_json(transcoded_request):
2535
+ # Jsonify the request body
2536
+
2537
+ body = json_format.MessageToJson(
2538
+ transcoded_request["body"], use_integers_for_enums=True
2539
+ )
2540
+ return body
2541
+
2542
+ @staticmethod
2543
+ def _get_query_params_json(transcoded_request):
2544
+ query_params = json.loads(
2545
+ json_format.MessageToJson(
2546
+ transcoded_request["query_params"],
2547
+ use_integers_for_enums=True,
2548
+ )
2549
+ )
2550
+ query_params.update(
2551
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateDataRetentionSettings._get_unset_required_fields(
2552
+ query_params
2553
+ )
2554
+ )
2555
+
2556
+ query_params["$alt"] = "json;enum-encoding=int"
2557
+ return query_params
2558
+
2559
+ class _BaseUpdateDataStream:
2560
+ def __hash__(self): # pragma: NO COVER
2561
+ return NotImplementedError("__hash__ must be implemented.")
2562
+
2563
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2564
+ "updateMask": {},
2565
+ }
2566
+
2567
+ @classmethod
2568
+ def _get_unset_required_fields(cls, message_dict):
2569
+ return {
2570
+ k: v
2571
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2572
+ if k not in message_dict
2573
+ }
2574
+
2575
+ @staticmethod
2576
+ def _get_http_options():
2577
+ http_options: List[Dict[str, str]] = [
2578
+ {
2579
+ "method": "patch",
2580
+ "uri": "/v1beta/{data_stream.name=properties/*/dataStreams/*}",
2581
+ "body": "data_stream",
2582
+ },
2583
+ ]
2584
+ return http_options
2585
+
2586
+ @staticmethod
2587
+ def _get_transcoded_request(http_options, request):
2588
+ pb_request = analytics_admin.UpdateDataStreamRequest.pb(request)
2589
+ transcoded_request = path_template.transcode(http_options, pb_request)
2590
+ return transcoded_request
2591
+
2592
+ @staticmethod
2593
+ def _get_request_body_json(transcoded_request):
2594
+ # Jsonify the request body
2595
+
2596
+ body = json_format.MessageToJson(
2597
+ transcoded_request["body"], use_integers_for_enums=True
2598
+ )
2599
+ return body
2600
+
2601
+ @staticmethod
2602
+ def _get_query_params_json(transcoded_request):
2603
+ query_params = json.loads(
2604
+ json_format.MessageToJson(
2605
+ transcoded_request["query_params"],
2606
+ use_integers_for_enums=True,
2607
+ )
2608
+ )
2609
+ query_params.update(
2610
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateDataStream._get_unset_required_fields(
2611
+ query_params
2612
+ )
2613
+ )
2614
+
2615
+ query_params["$alt"] = "json;enum-encoding=int"
2616
+ return query_params
2617
+
2618
+ class _BaseUpdateGoogleAdsLink:
2619
+ def __hash__(self): # pragma: NO COVER
2620
+ return NotImplementedError("__hash__ must be implemented.")
2621
+
2622
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2623
+ "updateMask": {},
2624
+ }
2625
+
2626
+ @classmethod
2627
+ def _get_unset_required_fields(cls, message_dict):
2628
+ return {
2629
+ k: v
2630
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2631
+ if k not in message_dict
2632
+ }
2633
+
2634
+ @staticmethod
2635
+ def _get_http_options():
2636
+ http_options: List[Dict[str, str]] = [
2637
+ {
2638
+ "method": "patch",
2639
+ "uri": "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}",
2640
+ "body": "google_ads_link",
2641
+ },
2642
+ ]
2643
+ return http_options
2644
+
2645
+ @staticmethod
2646
+ def _get_transcoded_request(http_options, request):
2647
+ pb_request = analytics_admin.UpdateGoogleAdsLinkRequest.pb(request)
2648
+ transcoded_request = path_template.transcode(http_options, pb_request)
2649
+ return transcoded_request
2650
+
2651
+ @staticmethod
2652
+ def _get_request_body_json(transcoded_request):
2653
+ # Jsonify the request body
2654
+
2655
+ body = json_format.MessageToJson(
2656
+ transcoded_request["body"], use_integers_for_enums=True
2657
+ )
2658
+ return body
2659
+
2660
+ @staticmethod
2661
+ def _get_query_params_json(transcoded_request):
2662
+ query_params = json.loads(
2663
+ json_format.MessageToJson(
2664
+ transcoded_request["query_params"],
2665
+ use_integers_for_enums=True,
2666
+ )
2667
+ )
2668
+ query_params.update(
2669
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateGoogleAdsLink._get_unset_required_fields(
2670
+ query_params
2671
+ )
2672
+ )
2673
+
2674
+ query_params["$alt"] = "json;enum-encoding=int"
2675
+ return query_params
2676
+
2677
+ class _BaseUpdateKeyEvent:
2678
+ def __hash__(self): # pragma: NO COVER
2679
+ return NotImplementedError("__hash__ must be implemented.")
2680
+
2681
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2682
+ "updateMask": {},
2683
+ }
2684
+
2685
+ @classmethod
2686
+ def _get_unset_required_fields(cls, message_dict):
2687
+ return {
2688
+ k: v
2689
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2690
+ if k not in message_dict
2691
+ }
2692
+
2693
+ @staticmethod
2694
+ def _get_http_options():
2695
+ http_options: List[Dict[str, str]] = [
2696
+ {
2697
+ "method": "patch",
2698
+ "uri": "/v1beta/{key_event.name=properties/*/keyEvents/*}",
2699
+ "body": "key_event",
2700
+ },
2701
+ ]
2702
+ return http_options
2703
+
2704
+ @staticmethod
2705
+ def _get_transcoded_request(http_options, request):
2706
+ pb_request = analytics_admin.UpdateKeyEventRequest.pb(request)
2707
+ transcoded_request = path_template.transcode(http_options, pb_request)
2708
+ return transcoded_request
2709
+
2710
+ @staticmethod
2711
+ def _get_request_body_json(transcoded_request):
2712
+ # Jsonify the request body
2713
+
2714
+ body = json_format.MessageToJson(
2715
+ transcoded_request["body"], use_integers_for_enums=True
2716
+ )
2717
+ return body
2718
+
2719
+ @staticmethod
2720
+ def _get_query_params_json(transcoded_request):
2721
+ query_params = json.loads(
2722
+ json_format.MessageToJson(
2723
+ transcoded_request["query_params"],
2724
+ use_integers_for_enums=True,
2725
+ )
2726
+ )
2727
+ query_params.update(
2728
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateKeyEvent._get_unset_required_fields(
2729
+ query_params
2730
+ )
2731
+ )
2732
+
2733
+ query_params["$alt"] = "json;enum-encoding=int"
2734
+ return query_params
2735
+
2736
+ class _BaseUpdateMeasurementProtocolSecret:
2737
+ def __hash__(self): # pragma: NO COVER
2738
+ return NotImplementedError("__hash__ must be implemented.")
2739
+
2740
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2741
+ "updateMask": {},
2742
+ }
2743
+
2744
+ @classmethod
2745
+ def _get_unset_required_fields(cls, message_dict):
2746
+ return {
2747
+ k: v
2748
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2749
+ if k not in message_dict
2750
+ }
2751
+
2752
+ @staticmethod
2753
+ def _get_http_options():
2754
+ http_options: List[Dict[str, str]] = [
2755
+ {
2756
+ "method": "patch",
2757
+ "uri": "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}",
2758
+ "body": "measurement_protocol_secret",
2759
+ },
2760
+ ]
2761
+ return http_options
2762
+
2763
+ @staticmethod
2764
+ def _get_transcoded_request(http_options, request):
2765
+ pb_request = analytics_admin.UpdateMeasurementProtocolSecretRequest.pb(
2766
+ request
2767
+ )
2768
+ transcoded_request = path_template.transcode(http_options, pb_request)
2769
+ return transcoded_request
2770
+
2771
+ @staticmethod
2772
+ def _get_request_body_json(transcoded_request):
2773
+ # Jsonify the request body
2774
+
2775
+ body = json_format.MessageToJson(
2776
+ transcoded_request["body"], use_integers_for_enums=True
2777
+ )
2778
+ return body
2779
+
2780
+ @staticmethod
2781
+ def _get_query_params_json(transcoded_request):
2782
+ query_params = json.loads(
2783
+ json_format.MessageToJson(
2784
+ transcoded_request["query_params"],
2785
+ use_integers_for_enums=True,
2786
+ )
2787
+ )
2788
+ query_params.update(
2789
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateMeasurementProtocolSecret._get_unset_required_fields(
2790
+ query_params
2791
+ )
2792
+ )
2793
+
2794
+ query_params["$alt"] = "json;enum-encoding=int"
2795
+ return query_params
2796
+
2797
+ class _BaseUpdateProperty:
2798
+ def __hash__(self): # pragma: NO COVER
2799
+ return NotImplementedError("__hash__ must be implemented.")
2800
+
2801
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
2802
+ "updateMask": {},
2803
+ }
2804
+
2805
+ @classmethod
2806
+ def _get_unset_required_fields(cls, message_dict):
2807
+ return {
2808
+ k: v
2809
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
2810
+ if k not in message_dict
2811
+ }
2812
+
2813
+ @staticmethod
2814
+ def _get_http_options():
2815
+ http_options: List[Dict[str, str]] = [
2816
+ {
2817
+ "method": "patch",
2818
+ "uri": "/v1beta/{property.name=properties/*}",
2819
+ "body": "property",
2820
+ },
2821
+ ]
2822
+ return http_options
2823
+
2824
+ @staticmethod
2825
+ def _get_transcoded_request(http_options, request):
2826
+ pb_request = analytics_admin.UpdatePropertyRequest.pb(request)
2827
+ transcoded_request = path_template.transcode(http_options, pb_request)
2828
+ return transcoded_request
2829
+
2830
+ @staticmethod
2831
+ def _get_request_body_json(transcoded_request):
2832
+ # Jsonify the request body
2833
+
2834
+ body = json_format.MessageToJson(
2835
+ transcoded_request["body"], use_integers_for_enums=True
2836
+ )
2837
+ return body
2838
+
2839
+ @staticmethod
2840
+ def _get_query_params_json(transcoded_request):
2841
+ query_params = json.loads(
2842
+ json_format.MessageToJson(
2843
+ transcoded_request["query_params"],
2844
+ use_integers_for_enums=True,
2845
+ )
2846
+ )
2847
+ query_params.update(
2848
+ _BaseAnalyticsAdminServiceRestTransport._BaseUpdateProperty._get_unset_required_fields(
2849
+ query_params
2850
+ )
2851
+ )
2852
+
2853
+ query_params["$alt"] = "json;enum-encoding=int"
2854
+ return query_params
2855
+
2856
+
2857
+ __all__ = ("_BaseAnalyticsAdminServiceRestTransport",)