google-cloud-modelarmor 0.1.0__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 (25) hide show
  1. google/cloud/modelarmor/__init__.py +117 -0
  2. google/cloud/modelarmor/gapic_version.py +16 -0
  3. google/cloud/modelarmor/py.typed +2 -0
  4. google/cloud/modelarmor_v1/__init__.py +114 -0
  5. google/cloud/modelarmor_v1/gapic_metadata.json +163 -0
  6. google/cloud/modelarmor_v1/gapic_version.py +16 -0
  7. google/cloud/modelarmor_v1/py.typed +2 -0
  8. google/cloud/modelarmor_v1/services/__init__.py +15 -0
  9. google/cloud/modelarmor_v1/services/model_armor/__init__.py +22 -0
  10. google/cloud/modelarmor_v1/services/model_armor/async_client.py +1377 -0
  11. google/cloud/modelarmor_v1/services/model_armor/client.py +1772 -0
  12. google/cloud/modelarmor_v1/services/model_armor/pagers.py +197 -0
  13. google/cloud/modelarmor_v1/services/model_armor/transports/__init__.py +36 -0
  14. google/cloud/modelarmor_v1/services/model_armor/transports/base.py +357 -0
  15. google/cloud/modelarmor_v1/services/model_armor/transports/grpc.py +607 -0
  16. google/cloud/modelarmor_v1/services/model_armor/transports/grpc_asyncio.py +730 -0
  17. google/cloud/modelarmor_v1/services/model_armor/transports/rest.py +2143 -0
  18. google/cloud/modelarmor_v1/services/model_armor/transports/rest_base.py +638 -0
  19. google/cloud/modelarmor_v1/types/__init__.py +106 -0
  20. google/cloud/modelarmor_v1/types/service.py +1881 -0
  21. google_cloud_modelarmor-0.1.0.dist-info/LICENSE +202 -0
  22. google_cloud_modelarmor-0.1.0.dist-info/METADATA +139 -0
  23. google_cloud_modelarmor-0.1.0.dist-info/RECORD +25 -0
  24. google_cloud_modelarmor-0.1.0.dist-info/WHEEL +5 -0
  25. google_cloud_modelarmor-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,638 @@
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.cloud.location import locations_pb2 # type: ignore
22
+ from google.protobuf import empty_pb2 # type: ignore
23
+ from google.protobuf import json_format
24
+
25
+ from google.cloud.modelarmor_v1.types import service
26
+
27
+ from .base import DEFAULT_CLIENT_INFO, ModelArmorTransport
28
+
29
+
30
+ class _BaseModelArmorRestTransport(ModelArmorTransport):
31
+ """Base REST backend transport for ModelArmor.
32
+
33
+ Note: This class is not meant to be used directly. Use its sync and
34
+ async sub-classes instead.
35
+
36
+ This class defines the same methods as the primary client, so the
37
+ primary client can load the underlying transport implementation
38
+ and call it.
39
+
40
+ It sends JSON representations of protocol buffers over HTTP/1.1
41
+ """
42
+
43
+ def __init__(
44
+ self,
45
+ *,
46
+ host: str = "modelarmor.googleapis.com",
47
+ credentials: Optional[Any] = None,
48
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
49
+ always_use_jwt_access: Optional[bool] = False,
50
+ url_scheme: str = "https",
51
+ api_audience: Optional[str] = None,
52
+ ) -> None:
53
+ """Instantiate the transport.
54
+ Args:
55
+ host (Optional[str]):
56
+ The hostname to connect to (default: 'modelarmor.googleapis.com').
57
+ credentials (Optional[Any]): The
58
+ authorization credentials to attach to requests. These
59
+ credentials identify the application to the service; if none
60
+ are specified, the client will attempt to ascertain the
61
+ credentials from the environment.
62
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
63
+ The client info used to send a user-agent string along with
64
+ API requests. If ``None``, then default info will be used.
65
+ Generally, you only need to set this if you are developing
66
+ your own client library.
67
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
68
+ be used for service account credentials.
69
+ url_scheme: the protocol scheme for the API endpoint. Normally
70
+ "https", but for testing or local servers,
71
+ "http" can be specified.
72
+ """
73
+ # Run the base constructor
74
+ maybe_url_match = re.match("^(?P<scheme>http(?:s)?://)?(?P<host>.*)$", host)
75
+ if maybe_url_match is None:
76
+ raise ValueError(
77
+ f"Unexpected hostname structure: {host}"
78
+ ) # pragma: NO COVER
79
+
80
+ url_match_items = maybe_url_match.groupdict()
81
+
82
+ host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host
83
+
84
+ super().__init__(
85
+ host=host,
86
+ credentials=credentials,
87
+ client_info=client_info,
88
+ always_use_jwt_access=always_use_jwt_access,
89
+ api_audience=api_audience,
90
+ )
91
+
92
+ class _BaseCreateTemplate:
93
+ def __hash__(self): # pragma: NO COVER
94
+ return NotImplementedError("__hash__ must be implemented.")
95
+
96
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
97
+ "templateId": "",
98
+ }
99
+
100
+ @classmethod
101
+ def _get_unset_required_fields(cls, message_dict):
102
+ return {
103
+ k: v
104
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
105
+ if k not in message_dict
106
+ }
107
+
108
+ @staticmethod
109
+ def _get_http_options():
110
+ http_options: List[Dict[str, str]] = [
111
+ {
112
+ "method": "post",
113
+ "uri": "/v1/{parent=projects/*/locations/*}/templates",
114
+ "body": "template",
115
+ },
116
+ ]
117
+ return http_options
118
+
119
+ @staticmethod
120
+ def _get_transcoded_request(http_options, request):
121
+ pb_request = service.CreateTemplateRequest.pb(request)
122
+ transcoded_request = path_template.transcode(http_options, pb_request)
123
+ return transcoded_request
124
+
125
+ @staticmethod
126
+ def _get_request_body_json(transcoded_request):
127
+ # Jsonify the request body
128
+
129
+ body = json_format.MessageToJson(
130
+ transcoded_request["body"], use_integers_for_enums=True
131
+ )
132
+ return body
133
+
134
+ @staticmethod
135
+ def _get_query_params_json(transcoded_request):
136
+ query_params = json.loads(
137
+ json_format.MessageToJson(
138
+ transcoded_request["query_params"],
139
+ use_integers_for_enums=True,
140
+ )
141
+ )
142
+ query_params.update(
143
+ _BaseModelArmorRestTransport._BaseCreateTemplate._get_unset_required_fields(
144
+ query_params
145
+ )
146
+ )
147
+
148
+ query_params["$alt"] = "json;enum-encoding=int"
149
+ return query_params
150
+
151
+ class _BaseDeleteTemplate:
152
+ def __hash__(self): # pragma: NO COVER
153
+ return NotImplementedError("__hash__ must be implemented.")
154
+
155
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
156
+
157
+ @classmethod
158
+ def _get_unset_required_fields(cls, message_dict):
159
+ return {
160
+ k: v
161
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
162
+ if k not in message_dict
163
+ }
164
+
165
+ @staticmethod
166
+ def _get_http_options():
167
+ http_options: List[Dict[str, str]] = [
168
+ {
169
+ "method": "delete",
170
+ "uri": "/v1/{name=projects/*/locations/*/templates/*}",
171
+ },
172
+ ]
173
+ return http_options
174
+
175
+ @staticmethod
176
+ def _get_transcoded_request(http_options, request):
177
+ pb_request = service.DeleteTemplateRequest.pb(request)
178
+ transcoded_request = path_template.transcode(http_options, pb_request)
179
+ return transcoded_request
180
+
181
+ @staticmethod
182
+ def _get_query_params_json(transcoded_request):
183
+ query_params = json.loads(
184
+ json_format.MessageToJson(
185
+ transcoded_request["query_params"],
186
+ use_integers_for_enums=True,
187
+ )
188
+ )
189
+ query_params.update(
190
+ _BaseModelArmorRestTransport._BaseDeleteTemplate._get_unset_required_fields(
191
+ query_params
192
+ )
193
+ )
194
+
195
+ query_params["$alt"] = "json;enum-encoding=int"
196
+ return query_params
197
+
198
+ class _BaseGetFloorSetting:
199
+ def __hash__(self): # pragma: NO COVER
200
+ return NotImplementedError("__hash__ must be implemented.")
201
+
202
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
203
+
204
+ @classmethod
205
+ def _get_unset_required_fields(cls, message_dict):
206
+ return {
207
+ k: v
208
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
209
+ if k not in message_dict
210
+ }
211
+
212
+ @staticmethod
213
+ def _get_http_options():
214
+ http_options: List[Dict[str, str]] = [
215
+ {
216
+ "method": "get",
217
+ "uri": "/v1/{name=projects/*/locations/*/floorSetting}",
218
+ },
219
+ {
220
+ "method": "get",
221
+ "uri": "/v1/{name=folders/*/locations/*/floorSetting}",
222
+ },
223
+ {
224
+ "method": "get",
225
+ "uri": "/v1/{name=organizations/*/locations/*/floorSetting}",
226
+ },
227
+ ]
228
+ return http_options
229
+
230
+ @staticmethod
231
+ def _get_transcoded_request(http_options, request):
232
+ pb_request = service.GetFloorSettingRequest.pb(request)
233
+ transcoded_request = path_template.transcode(http_options, pb_request)
234
+ return transcoded_request
235
+
236
+ @staticmethod
237
+ def _get_query_params_json(transcoded_request):
238
+ query_params = json.loads(
239
+ json_format.MessageToJson(
240
+ transcoded_request["query_params"],
241
+ use_integers_for_enums=True,
242
+ )
243
+ )
244
+ query_params.update(
245
+ _BaseModelArmorRestTransport._BaseGetFloorSetting._get_unset_required_fields(
246
+ query_params
247
+ )
248
+ )
249
+
250
+ query_params["$alt"] = "json;enum-encoding=int"
251
+ return query_params
252
+
253
+ class _BaseGetTemplate:
254
+ def __hash__(self): # pragma: NO COVER
255
+ return NotImplementedError("__hash__ must be implemented.")
256
+
257
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
258
+
259
+ @classmethod
260
+ def _get_unset_required_fields(cls, message_dict):
261
+ return {
262
+ k: v
263
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
264
+ if k not in message_dict
265
+ }
266
+
267
+ @staticmethod
268
+ def _get_http_options():
269
+ http_options: List[Dict[str, str]] = [
270
+ {
271
+ "method": "get",
272
+ "uri": "/v1/{name=projects/*/locations/*/templates/*}",
273
+ },
274
+ ]
275
+ return http_options
276
+
277
+ @staticmethod
278
+ def _get_transcoded_request(http_options, request):
279
+ pb_request = service.GetTemplateRequest.pb(request)
280
+ transcoded_request = path_template.transcode(http_options, pb_request)
281
+ return transcoded_request
282
+
283
+ @staticmethod
284
+ def _get_query_params_json(transcoded_request):
285
+ query_params = json.loads(
286
+ json_format.MessageToJson(
287
+ transcoded_request["query_params"],
288
+ use_integers_for_enums=True,
289
+ )
290
+ )
291
+ query_params.update(
292
+ _BaseModelArmorRestTransport._BaseGetTemplate._get_unset_required_fields(
293
+ query_params
294
+ )
295
+ )
296
+
297
+ query_params["$alt"] = "json;enum-encoding=int"
298
+ return query_params
299
+
300
+ class _BaseListTemplates:
301
+ def __hash__(self): # pragma: NO COVER
302
+ return NotImplementedError("__hash__ must be implemented.")
303
+
304
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
305
+
306
+ @classmethod
307
+ def _get_unset_required_fields(cls, message_dict):
308
+ return {
309
+ k: v
310
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
311
+ if k not in message_dict
312
+ }
313
+
314
+ @staticmethod
315
+ def _get_http_options():
316
+ http_options: List[Dict[str, str]] = [
317
+ {
318
+ "method": "get",
319
+ "uri": "/v1/{parent=projects/*/locations/*}/templates",
320
+ },
321
+ ]
322
+ return http_options
323
+
324
+ @staticmethod
325
+ def _get_transcoded_request(http_options, request):
326
+ pb_request = service.ListTemplatesRequest.pb(request)
327
+ transcoded_request = path_template.transcode(http_options, pb_request)
328
+ return transcoded_request
329
+
330
+ @staticmethod
331
+ def _get_query_params_json(transcoded_request):
332
+ query_params = json.loads(
333
+ json_format.MessageToJson(
334
+ transcoded_request["query_params"],
335
+ use_integers_for_enums=True,
336
+ )
337
+ )
338
+ query_params.update(
339
+ _BaseModelArmorRestTransport._BaseListTemplates._get_unset_required_fields(
340
+ query_params
341
+ )
342
+ )
343
+
344
+ query_params["$alt"] = "json;enum-encoding=int"
345
+ return query_params
346
+
347
+ class _BaseSanitizeModelResponse:
348
+ def __hash__(self): # pragma: NO COVER
349
+ return NotImplementedError("__hash__ must be implemented.")
350
+
351
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
352
+
353
+ @classmethod
354
+ def _get_unset_required_fields(cls, message_dict):
355
+ return {
356
+ k: v
357
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
358
+ if k not in message_dict
359
+ }
360
+
361
+ @staticmethod
362
+ def _get_http_options():
363
+ http_options: List[Dict[str, str]] = [
364
+ {
365
+ "method": "post",
366
+ "uri": "/v1/{name=projects/*/locations/*/templates/*}:sanitizeModelResponse",
367
+ "body": "*",
368
+ },
369
+ ]
370
+ return http_options
371
+
372
+ @staticmethod
373
+ def _get_transcoded_request(http_options, request):
374
+ pb_request = service.SanitizeModelResponseRequest.pb(request)
375
+ transcoded_request = path_template.transcode(http_options, pb_request)
376
+ return transcoded_request
377
+
378
+ @staticmethod
379
+ def _get_request_body_json(transcoded_request):
380
+ # Jsonify the request body
381
+
382
+ body = json_format.MessageToJson(
383
+ transcoded_request["body"], use_integers_for_enums=True
384
+ )
385
+ return body
386
+
387
+ @staticmethod
388
+ def _get_query_params_json(transcoded_request):
389
+ query_params = json.loads(
390
+ json_format.MessageToJson(
391
+ transcoded_request["query_params"],
392
+ use_integers_for_enums=True,
393
+ )
394
+ )
395
+ query_params.update(
396
+ _BaseModelArmorRestTransport._BaseSanitizeModelResponse._get_unset_required_fields(
397
+ query_params
398
+ )
399
+ )
400
+
401
+ query_params["$alt"] = "json;enum-encoding=int"
402
+ return query_params
403
+
404
+ class _BaseSanitizeUserPrompt:
405
+ def __hash__(self): # pragma: NO COVER
406
+ return NotImplementedError("__hash__ must be implemented.")
407
+
408
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
409
+
410
+ @classmethod
411
+ def _get_unset_required_fields(cls, message_dict):
412
+ return {
413
+ k: v
414
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
415
+ if k not in message_dict
416
+ }
417
+
418
+ @staticmethod
419
+ def _get_http_options():
420
+ http_options: List[Dict[str, str]] = [
421
+ {
422
+ "method": "post",
423
+ "uri": "/v1/{name=projects/*/locations/*/templates/*}:sanitizeUserPrompt",
424
+ "body": "*",
425
+ },
426
+ ]
427
+ return http_options
428
+
429
+ @staticmethod
430
+ def _get_transcoded_request(http_options, request):
431
+ pb_request = service.SanitizeUserPromptRequest.pb(request)
432
+ transcoded_request = path_template.transcode(http_options, pb_request)
433
+ return transcoded_request
434
+
435
+ @staticmethod
436
+ def _get_request_body_json(transcoded_request):
437
+ # Jsonify the request body
438
+
439
+ body = json_format.MessageToJson(
440
+ transcoded_request["body"], use_integers_for_enums=True
441
+ )
442
+ return body
443
+
444
+ @staticmethod
445
+ def _get_query_params_json(transcoded_request):
446
+ query_params = json.loads(
447
+ json_format.MessageToJson(
448
+ transcoded_request["query_params"],
449
+ use_integers_for_enums=True,
450
+ )
451
+ )
452
+ query_params.update(
453
+ _BaseModelArmorRestTransport._BaseSanitizeUserPrompt._get_unset_required_fields(
454
+ query_params
455
+ )
456
+ )
457
+
458
+ query_params["$alt"] = "json;enum-encoding=int"
459
+ return query_params
460
+
461
+ class _BaseUpdateFloorSetting:
462
+ def __hash__(self): # pragma: NO COVER
463
+ return NotImplementedError("__hash__ must be implemented.")
464
+
465
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
466
+
467
+ @classmethod
468
+ def _get_unset_required_fields(cls, message_dict):
469
+ return {
470
+ k: v
471
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
472
+ if k not in message_dict
473
+ }
474
+
475
+ @staticmethod
476
+ def _get_http_options():
477
+ http_options: List[Dict[str, str]] = [
478
+ {
479
+ "method": "patch",
480
+ "uri": "/v1/{floor_setting.name=projects/*/locations/*/floorSetting}",
481
+ "body": "floor_setting",
482
+ },
483
+ {
484
+ "method": "patch",
485
+ "uri": "/v1/{floor_setting.name=folders/*/locations/*/floorSetting}",
486
+ "body": "floor_setting",
487
+ },
488
+ {
489
+ "method": "patch",
490
+ "uri": "/v1/{floor_setting.name=organizations/*/locations/*/floorSetting}",
491
+ "body": "floor_setting",
492
+ },
493
+ ]
494
+ return http_options
495
+
496
+ @staticmethod
497
+ def _get_transcoded_request(http_options, request):
498
+ pb_request = service.UpdateFloorSettingRequest.pb(request)
499
+ transcoded_request = path_template.transcode(http_options, pb_request)
500
+ return transcoded_request
501
+
502
+ @staticmethod
503
+ def _get_request_body_json(transcoded_request):
504
+ # Jsonify the request body
505
+
506
+ body = json_format.MessageToJson(
507
+ transcoded_request["body"], use_integers_for_enums=True
508
+ )
509
+ return body
510
+
511
+ @staticmethod
512
+ def _get_query_params_json(transcoded_request):
513
+ query_params = json.loads(
514
+ json_format.MessageToJson(
515
+ transcoded_request["query_params"],
516
+ use_integers_for_enums=True,
517
+ )
518
+ )
519
+ query_params.update(
520
+ _BaseModelArmorRestTransport._BaseUpdateFloorSetting._get_unset_required_fields(
521
+ query_params
522
+ )
523
+ )
524
+
525
+ query_params["$alt"] = "json;enum-encoding=int"
526
+ return query_params
527
+
528
+ class _BaseUpdateTemplate:
529
+ def __hash__(self): # pragma: NO COVER
530
+ return NotImplementedError("__hash__ must be implemented.")
531
+
532
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
533
+ "updateMask": {},
534
+ }
535
+
536
+ @classmethod
537
+ def _get_unset_required_fields(cls, message_dict):
538
+ return {
539
+ k: v
540
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
541
+ if k not in message_dict
542
+ }
543
+
544
+ @staticmethod
545
+ def _get_http_options():
546
+ http_options: List[Dict[str, str]] = [
547
+ {
548
+ "method": "patch",
549
+ "uri": "/v1/{template.name=projects/*/locations/*/templates/*}",
550
+ "body": "template",
551
+ },
552
+ ]
553
+ return http_options
554
+
555
+ @staticmethod
556
+ def _get_transcoded_request(http_options, request):
557
+ pb_request = service.UpdateTemplateRequest.pb(request)
558
+ transcoded_request = path_template.transcode(http_options, pb_request)
559
+ return transcoded_request
560
+
561
+ @staticmethod
562
+ def _get_request_body_json(transcoded_request):
563
+ # Jsonify the request body
564
+
565
+ body = json_format.MessageToJson(
566
+ transcoded_request["body"], use_integers_for_enums=True
567
+ )
568
+ return body
569
+
570
+ @staticmethod
571
+ def _get_query_params_json(transcoded_request):
572
+ query_params = json.loads(
573
+ json_format.MessageToJson(
574
+ transcoded_request["query_params"],
575
+ use_integers_for_enums=True,
576
+ )
577
+ )
578
+ query_params.update(
579
+ _BaseModelArmorRestTransport._BaseUpdateTemplate._get_unset_required_fields(
580
+ query_params
581
+ )
582
+ )
583
+
584
+ query_params["$alt"] = "json;enum-encoding=int"
585
+ return query_params
586
+
587
+ class _BaseGetLocation:
588
+ def __hash__(self): # pragma: NO COVER
589
+ return NotImplementedError("__hash__ must be implemented.")
590
+
591
+ @staticmethod
592
+ def _get_http_options():
593
+ http_options: List[Dict[str, str]] = [
594
+ {
595
+ "method": "get",
596
+ "uri": "/v1/{name=projects/*/locations/*}",
597
+ },
598
+ ]
599
+ return http_options
600
+
601
+ @staticmethod
602
+ def _get_transcoded_request(http_options, request):
603
+ request_kwargs = json_format.MessageToDict(request)
604
+ transcoded_request = path_template.transcode(http_options, **request_kwargs)
605
+ return transcoded_request
606
+
607
+ @staticmethod
608
+ def _get_query_params_json(transcoded_request):
609
+ query_params = json.loads(json.dumps(transcoded_request["query_params"]))
610
+ return query_params
611
+
612
+ class _BaseListLocations:
613
+ def __hash__(self): # pragma: NO COVER
614
+ return NotImplementedError("__hash__ must be implemented.")
615
+
616
+ @staticmethod
617
+ def _get_http_options():
618
+ http_options: List[Dict[str, str]] = [
619
+ {
620
+ "method": "get",
621
+ "uri": "/v1/{name=projects/*}/locations",
622
+ },
623
+ ]
624
+ return http_options
625
+
626
+ @staticmethod
627
+ def _get_transcoded_request(http_options, request):
628
+ request_kwargs = json_format.MessageToDict(request)
629
+ transcoded_request = path_template.transcode(http_options, **request_kwargs)
630
+ return transcoded_request
631
+
632
+ @staticmethod
633
+ def _get_query_params_json(transcoded_request):
634
+ query_params = json.loads(json.dumps(transcoded_request["query_params"]))
635
+ return query_params
636
+
637
+
638
+ __all__ = ("_BaseModelArmorRestTransport",)