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 (
@@ -335,7 +335,7 @@ def pre_get_location(
335
335
self ,
336
336
request : locations_pb2 .GetLocationRequest ,
337
337
metadata : Sequence [Tuple [str , str ]],
338
- ) -> locations_pb2 .Location :
338
+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
339
339
"""Pre-rpc interceptor for get_location
340
340
341
341
Override in a subclass to manipulate the request or metadata
@@ -344,7 +344,7 @@ def pre_get_location(
344
344
return request , metadata
345
345
346
346
def post_get_location (
347
- self , response : locations_pb2 .GetLocationRequest
347
+ self , response : locations_pb2 .Location
348
348
) -> locations_pb2 .Location :
349
349
"""Post-rpc interceptor for get_location
350
350
@@ -358,7 +358,7 @@ def pre_list_locations(
358
358
self ,
359
359
request : locations_pb2 .ListLocationsRequest ,
360
360
metadata : Sequence [Tuple [str , str ]],
361
- ) -> locations_pb2 .ListLocationsResponse :
361
+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
362
362
"""Pre-rpc interceptor for list_locations
363
363
364
364
Override in a subclass to manipulate the request or metadata
@@ -367,7 +367,7 @@ def pre_list_locations(
367
367
return request , metadata
368
368
369
369
def post_list_locations (
370
- self , response : locations_pb2 .ListLocationsRequest
370
+ self , response : locations_pb2 .ListLocationsResponse
371
371
) -> locations_pb2 .ListLocationsResponse :
372
372
"""Post-rpc interceptor for list_locations
373
373
@@ -381,17 +381,15 @@ def pre_get_iam_policy(
381
381
self ,
382
382
request : iam_policy_pb2 .GetIamPolicyRequest ,
383
383
metadata : Sequence [Tuple [str , str ]],
384
- ) -> policy_pb2 . Policy :
384
+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
385
385
"""Pre-rpc interceptor for get_iam_policy
386
386
387
387
Override in a subclass to manipulate the request or metadata
388
388
before they are sent to the GkeHubMembershipService server.
389
389
"""
390
390
return request , metadata
391
391
392
- def post_get_iam_policy (
393
- self , response : iam_policy_pb2 .GetIamPolicyRequest
394
- ) -> policy_pb2 .Policy :
392
+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
395
393
"""Post-rpc interceptor for get_iam_policy
396
394
397
395
Override in a subclass to manipulate the response
@@ -404,17 +402,15 @@ def pre_set_iam_policy(
404
402
self ,
405
403
request : iam_policy_pb2 .SetIamPolicyRequest ,
406
404
metadata : Sequence [Tuple [str , str ]],
407
- ) -> policy_pb2 . Policy :
405
+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
408
406
"""Pre-rpc interceptor for set_iam_policy
409
407
410
408
Override in a subclass to manipulate the request or metadata
411
409
before they are sent to the GkeHubMembershipService server.
412
410
"""
413
411
return request , metadata
414
412
415
- def post_set_iam_policy (
416
- self , response : iam_policy_pb2 .SetIamPolicyRequest
417
- ) -> policy_pb2 .Policy :
413
+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
418
414
"""Post-rpc interceptor for set_iam_policy
419
415
420
416
Override in a subclass to manipulate the response
@@ -427,7 +423,7 @@ def pre_test_iam_permissions(
427
423
self ,
428
424
request : iam_policy_pb2 .TestIamPermissionsRequest ,
429
425
metadata : Sequence [Tuple [str , str ]],
430
- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
426
+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
431
427
"""Pre-rpc interceptor for test_iam_permissions
432
428
433
429
Override in a subclass to manipulate the request or metadata
@@ -436,7 +432,7 @@ def pre_test_iam_permissions(
436
432
return request , metadata
437
433
438
434
def post_test_iam_permissions (
439
- self , response : iam_policy_pb2 .TestIamPermissionsRequest
435
+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
440
436
) -> iam_policy_pb2 .TestIamPermissionsResponse :
441
437
"""Post-rpc interceptor for test_iam_permissions
442
438
@@ -450,17 +446,15 @@ def pre_cancel_operation(
450
446
self ,
451
447
request : operations_pb2 .CancelOperationRequest ,
452
448
metadata : Sequence [Tuple [str , str ]],
453
- ) -> None :
449
+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
454
450
"""Pre-rpc interceptor for cancel_operation
455
451
456
452
Override in a subclass to manipulate the request or metadata
457
453
before they are sent to the GkeHubMembershipService server.
458
454
"""
459
455
return request , metadata
460
456
461
- def post_cancel_operation (
462
- self , response : operations_pb2 .CancelOperationRequest
463
- ) -> None :
457
+ def post_cancel_operation (self , response : None ) -> None :
464
458
"""Post-rpc interceptor for cancel_operation
465
459
466
460
Override in a subclass to manipulate the response
@@ -473,17 +467,15 @@ def pre_delete_operation(
473
467
self ,
474
468
request : operations_pb2 .DeleteOperationRequest ,
475
469
metadata : Sequence [Tuple [str , str ]],
476
- ) -> None :
470
+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
477
471
"""Pre-rpc interceptor for delete_operation
478
472
479
473
Override in a subclass to manipulate the request or metadata
480
474
before they are sent to the GkeHubMembershipService server.
481
475
"""
482
476
return request , metadata
483
477
484
- def post_delete_operation (
485
- self , response : operations_pb2 .DeleteOperationRequest
486
- ) -> None :
478
+ def post_delete_operation (self , response : None ) -> None :
487
479
"""Post-rpc interceptor for delete_operation
488
480
489
481
Override in a subclass to manipulate the response
@@ -496,7 +488,7 @@ def pre_get_operation(
496
488
self ,
497
489
request : operations_pb2 .GetOperationRequest ,
498
490
metadata : Sequence [Tuple [str , str ]],
499
- ) -> operations_pb2 .Operation :
491
+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
500
492
"""Pre-rpc interceptor for get_operation
501
493
502
494
Override in a subclass to manipulate the request or metadata
@@ -505,7 +497,7 @@ def pre_get_operation(
505
497
return request , metadata
506
498
507
499
def post_get_operation (
508
- self , response : operations_pb2 .GetOperationRequest
500
+ self , response : operations_pb2 .Operation
509
501
) -> operations_pb2 .Operation :
510
502
"""Post-rpc interceptor for get_operation
511
503
@@ -519,7 +511,7 @@ def pre_list_operations(
519
511
self ,
520
512
request : operations_pb2 .ListOperationsRequest ,
521
513
metadata : Sequence [Tuple [str , str ]],
522
- ) -> operations_pb2 .ListOperationsResponse :
514
+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
523
515
"""Pre-rpc interceptor for list_operations
524
516
525
517
Override in a subclass to manipulate the request or metadata
@@ -528,7 +520,7 @@ def pre_list_operations(
528
520
return request , metadata
529
521
530
522
def post_list_operations (
531
- self , response : operations_pb2 .ListOperationsRequest
523
+ self , response : operations_pb2 .ListOperationsResponse
532
524
) -> operations_pb2 .ListOperationsResponse :
533
525
"""Post-rpc interceptor for list_operations
534
526
@@ -701,7 +693,7 @@ class _CreateMembership(GkeHubMembershipServiceRestStub):
701
693
def __hash__ (self ):
702
694
return hash ("CreateMembership" )
703
695
704
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
696
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
705
697
"membershipId" : "" ,
706
698
}
707
699
@@ -803,7 +795,7 @@ class _DeleteMembership(GkeHubMembershipServiceRestStub):
803
795
def __hash__ (self ):
804
796
return hash ("DeleteMembership" )
805
797
806
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
798
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
807
799
808
800
@classmethod
809
801
def _get_unset_required_fields (cls , message_dict ):
@@ -894,7 +886,7 @@ class _GenerateConnectManifest(GkeHubMembershipServiceRestStub):
894
886
def __hash__ (self ):
895
887
return hash ("GenerateConnectManifest" )
896
888
897
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
889
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
898
890
899
891
@classmethod
900
892
def _get_unset_required_fields (cls , message_dict ):
@@ -988,7 +980,7 @@ class _GenerateExclusivityManifest(GkeHubMembershipServiceRestStub):
988
980
def __hash__ (self ):
989
981
return hash ("GenerateExclusivityManifest" )
990
982
991
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
983
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
992
984
993
985
@classmethod
994
986
def _get_unset_required_fields (cls , message_dict ):
@@ -1082,7 +1074,7 @@ class _GetMembership(GkeHubMembershipServiceRestStub):
1082
1074
def __hash__ (self ):
1083
1075
return hash ("GetMembership" )
1084
1076
1085
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1077
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1086
1078
1087
1079
@classmethod
1088
1080
def _get_unset_required_fields (cls , message_dict ):
@@ -1172,7 +1164,7 @@ class _ListMemberships(GkeHubMembershipServiceRestStub):
1172
1164
def __hash__ (self ):
1173
1165
return hash ("ListMemberships" )
1174
1166
1175
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1167
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1176
1168
1177
1169
@classmethod
1178
1170
def _get_unset_required_fields (cls , message_dict ):
@@ -1264,7 +1256,7 @@ class _UpdateMembership(GkeHubMembershipServiceRestStub):
1264
1256
def __hash__ (self ):
1265
1257
return hash ("UpdateMembership" )
1266
1258
1267
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1259
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1268
1260
"updateMask" : {},
1269
1261
}
1270
1262
@@ -1366,7 +1358,7 @@ class _ValidateExclusivity(GkeHubMembershipServiceRestStub):
1366
1358
def __hash__ (self ):
1367
1359
return hash ("ValidateExclusivity" )
1368
1360
1369
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1361
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1370
1362
"intendedMembership" : "" ,
1371
1363
}
1372
1364
0 commit comments