17
17
import dataclasses
18
18
import json # type: ignore
19
19
import re
20
- from typing import Callable , Dict , List , Optional , Sequence , Tuple , Union
20
+ from typing import Any , Callable , Dict , List , Optional , Sequence , Tuple , Union
21
21
import warnings
22
22
23
23
from google .api_core import (
@@ -329,7 +329,7 @@ def pre_list_locations(
329
329
self ,
330
330
request : locations_pb2 .ListLocationsRequest ,
331
331
metadata : Sequence [Tuple [str , str ]],
332
- ) -> locations_pb2 .ListLocationsResponse :
332
+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
333
333
"""Pre-rpc interceptor for list_locations
334
334
335
335
Override in a subclass to manipulate the request or metadata
@@ -338,7 +338,7 @@ def pre_list_locations(
338
338
return request , metadata
339
339
340
340
def post_list_locations (
341
- self , response : locations_pb2 .ListLocationsRequest
341
+ self , response : locations_pb2 .ListLocationsResponse
342
342
) -> locations_pb2 .ListLocationsResponse :
343
343
"""Post-rpc interceptor for list_locations
344
344
@@ -352,17 +352,15 @@ def pre_get_iam_policy(
352
352
self ,
353
353
request : iam_policy_pb2 .GetIamPolicyRequest ,
354
354
metadata : Sequence [Tuple [str , str ]],
355
- ) -> policy_pb2 . Policy :
355
+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
356
356
"""Pre-rpc interceptor for get_iam_policy
357
357
358
358
Override in a subclass to manipulate the request or metadata
359
359
before they are sent to the FunctionService server.
360
360
"""
361
361
return request , metadata
362
362
363
- def post_get_iam_policy (
364
- self , response : iam_policy_pb2 .GetIamPolicyRequest
365
- ) -> policy_pb2 .Policy :
363
+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
366
364
"""Post-rpc interceptor for get_iam_policy
367
365
368
366
Override in a subclass to manipulate the response
@@ -375,17 +373,15 @@ def pre_set_iam_policy(
375
373
self ,
376
374
request : iam_policy_pb2 .SetIamPolicyRequest ,
377
375
metadata : Sequence [Tuple [str , str ]],
378
- ) -> policy_pb2 . Policy :
376
+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
379
377
"""Pre-rpc interceptor for set_iam_policy
380
378
381
379
Override in a subclass to manipulate the request or metadata
382
380
before they are sent to the FunctionService server.
383
381
"""
384
382
return request , metadata
385
383
386
- def post_set_iam_policy (
387
- self , response : iam_policy_pb2 .SetIamPolicyRequest
388
- ) -> policy_pb2 .Policy :
384
+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
389
385
"""Post-rpc interceptor for set_iam_policy
390
386
391
387
Override in a subclass to manipulate the response
@@ -398,7 +394,7 @@ def pre_test_iam_permissions(
398
394
self ,
399
395
request : iam_policy_pb2 .TestIamPermissionsRequest ,
400
396
metadata : Sequence [Tuple [str , str ]],
401
- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
397
+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
402
398
"""Pre-rpc interceptor for test_iam_permissions
403
399
404
400
Override in a subclass to manipulate the request or metadata
@@ -407,7 +403,7 @@ def pre_test_iam_permissions(
407
403
return request , metadata
408
404
409
405
def post_test_iam_permissions (
410
- self , response : iam_policy_pb2 .TestIamPermissionsRequest
406
+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
411
407
) -> iam_policy_pb2 .TestIamPermissionsResponse :
412
408
"""Post-rpc interceptor for test_iam_permissions
413
409
@@ -421,7 +417,7 @@ def pre_get_operation(
421
417
self ,
422
418
request : operations_pb2 .GetOperationRequest ,
423
419
metadata : Sequence [Tuple [str , str ]],
424
- ) -> operations_pb2 .Operation :
420
+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
425
421
"""Pre-rpc interceptor for get_operation
426
422
427
423
Override in a subclass to manipulate the request or metadata
@@ -430,7 +426,7 @@ def pre_get_operation(
430
426
return request , metadata
431
427
432
428
def post_get_operation (
433
- self , response : operations_pb2 .GetOperationRequest
429
+ self , response : operations_pb2 .Operation
434
430
) -> operations_pb2 .Operation :
435
431
"""Post-rpc interceptor for get_operation
436
432
@@ -444,7 +440,7 @@ def pre_list_operations(
444
440
self ,
445
441
request : operations_pb2 .ListOperationsRequest ,
446
442
metadata : Sequence [Tuple [str , str ]],
447
- ) -> operations_pb2 .ListOperationsResponse :
443
+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
448
444
"""Pre-rpc interceptor for list_operations
449
445
450
446
Override in a subclass to manipulate the request or metadata
@@ -453,7 +449,7 @@ def pre_list_operations(
453
449
return request , metadata
454
450
455
451
def post_list_operations (
456
- self , response : operations_pb2 .ListOperationsRequest
452
+ self , response : operations_pb2 .ListOperationsResponse
457
453
) -> operations_pb2 .ListOperationsResponse :
458
454
"""Post-rpc interceptor for list_operations
459
455
@@ -610,7 +606,7 @@ class _CreateFunction(FunctionServiceRestStub):
610
606
def __hash__ (self ):
611
607
return hash ("CreateFunction" )
612
608
613
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
609
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
614
610
615
611
@classmethod
616
612
def _get_unset_required_fields (cls , message_dict ):
@@ -706,7 +702,7 @@ class _DeleteFunction(FunctionServiceRestStub):
706
702
def __hash__ (self ):
707
703
return hash ("DeleteFunction" )
708
704
709
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
705
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
710
706
711
707
@classmethod
712
708
def _get_unset_required_fields (cls , message_dict ):
@@ -793,7 +789,7 @@ class _GenerateDownloadUrl(FunctionServiceRestStub):
793
789
def __hash__ (self ):
794
790
return hash ("GenerateDownloadUrl" )
795
791
796
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
792
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
797
793
798
794
@classmethod
799
795
def _get_unset_required_fields (cls , message_dict ):
@@ -890,7 +886,7 @@ class _GenerateUploadUrl(FunctionServiceRestStub):
890
886
def __hash__ (self ):
891
887
return hash ("GenerateUploadUrl" )
892
888
893
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
889
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
894
890
895
891
@classmethod
896
892
def _get_unset_required_fields (cls , message_dict ):
@@ -987,7 +983,7 @@ class _GetFunction(FunctionServiceRestStub):
987
983
def __hash__ (self ):
988
984
return hash ("GetFunction" )
989
985
990
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
986
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
991
987
992
988
@classmethod
993
989
def _get_unset_required_fields (cls , message_dict ):
@@ -1077,7 +1073,7 @@ class _ListFunctions(FunctionServiceRestStub):
1077
1073
def __hash__ (self ):
1078
1074
return hash ("ListFunctions" )
1079
1075
1080
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1076
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1081
1077
1082
1078
@classmethod
1083
1079
def _get_unset_required_fields (cls , message_dict ):
@@ -1163,7 +1159,7 @@ class _ListRuntimes(FunctionServiceRestStub):
1163
1159
def __hash__ (self ):
1164
1160
return hash ("ListRuntimes" )
1165
1161
1166
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1162
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1167
1163
1168
1164
@classmethod
1169
1165
def _get_unset_required_fields (cls , message_dict ):
@@ -1249,7 +1245,7 @@ class _UpdateFunction(FunctionServiceRestStub):
1249
1245
def __hash__ (self ):
1250
1246
return hash ("UpdateFunction" )
1251
1247
1252
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1248
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1253
1249
1254
1250
@classmethod
1255
1251
def _get_unset_required_fields (cls , message_dict ):
0 commit comments