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 (
@@ -755,7 +755,7 @@ def pre_get_location(
755
755
self ,
756
756
request : locations_pb2 .GetLocationRequest ,
757
757
metadata : Sequence [Tuple [str , str ]],
758
- ) -> locations_pb2 .Location :
758
+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
759
759
"""Pre-rpc interceptor for get_location
760
760
761
761
Override in a subclass to manipulate the request or metadata
@@ -764,7 +764,7 @@ def pre_get_location(
764
764
return request , metadata
765
765
766
766
def post_get_location (
767
- self , response : locations_pb2 .GetLocationRequest
767
+ self , response : locations_pb2 .Location
768
768
) -> locations_pb2 .Location :
769
769
"""Post-rpc interceptor for get_location
770
770
@@ -778,7 +778,7 @@ def pre_list_locations(
778
778
self ,
779
779
request : locations_pb2 .ListLocationsRequest ,
780
780
metadata : Sequence [Tuple [str , str ]],
781
- ) -> locations_pb2 .ListLocationsResponse :
781
+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
782
782
"""Pre-rpc interceptor for list_locations
783
783
784
784
Override in a subclass to manipulate the request or metadata
@@ -787,7 +787,7 @@ def pre_list_locations(
787
787
return request , metadata
788
788
789
789
def post_list_locations (
790
- self , response : locations_pb2 .ListLocationsRequest
790
+ self , response : locations_pb2 .ListLocationsResponse
791
791
) -> locations_pb2 .ListLocationsResponse :
792
792
"""Post-rpc interceptor for list_locations
793
793
@@ -801,17 +801,15 @@ def pre_get_iam_policy(
801
801
self ,
802
802
request : iam_policy_pb2 .GetIamPolicyRequest ,
803
803
metadata : Sequence [Tuple [str , str ]],
804
- ) -> policy_pb2 . Policy :
804
+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
805
805
"""Pre-rpc interceptor for get_iam_policy
806
806
807
807
Override in a subclass to manipulate the request or metadata
808
808
before they are sent to the CloudDeploy server.
809
809
"""
810
810
return request , metadata
811
811
812
- def post_get_iam_policy (
813
- self , response : iam_policy_pb2 .GetIamPolicyRequest
814
- ) -> policy_pb2 .Policy :
812
+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
815
813
"""Post-rpc interceptor for get_iam_policy
816
814
817
815
Override in a subclass to manipulate the response
@@ -824,17 +822,15 @@ def pre_set_iam_policy(
824
822
self ,
825
823
request : iam_policy_pb2 .SetIamPolicyRequest ,
826
824
metadata : Sequence [Tuple [str , str ]],
827
- ) -> policy_pb2 . Policy :
825
+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
828
826
"""Pre-rpc interceptor for set_iam_policy
829
827
830
828
Override in a subclass to manipulate the request or metadata
831
829
before they are sent to the CloudDeploy server.
832
830
"""
833
831
return request , metadata
834
832
835
- def post_set_iam_policy (
836
- self , response : iam_policy_pb2 .SetIamPolicyRequest
837
- ) -> policy_pb2 .Policy :
833
+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
838
834
"""Post-rpc interceptor for set_iam_policy
839
835
840
836
Override in a subclass to manipulate the response
@@ -847,7 +843,7 @@ def pre_test_iam_permissions(
847
843
self ,
848
844
request : iam_policy_pb2 .TestIamPermissionsRequest ,
849
845
metadata : Sequence [Tuple [str , str ]],
850
- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
846
+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
851
847
"""Pre-rpc interceptor for test_iam_permissions
852
848
853
849
Override in a subclass to manipulate the request or metadata
@@ -856,7 +852,7 @@ def pre_test_iam_permissions(
856
852
return request , metadata
857
853
858
854
def post_test_iam_permissions (
859
- self , response : iam_policy_pb2 .TestIamPermissionsRequest
855
+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
860
856
) -> iam_policy_pb2 .TestIamPermissionsResponse :
861
857
"""Post-rpc interceptor for test_iam_permissions
862
858
@@ -870,17 +866,15 @@ def pre_cancel_operation(
870
866
self ,
871
867
request : operations_pb2 .CancelOperationRequest ,
872
868
metadata : Sequence [Tuple [str , str ]],
873
- ) -> None :
869
+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
874
870
"""Pre-rpc interceptor for cancel_operation
875
871
876
872
Override in a subclass to manipulate the request or metadata
877
873
before they are sent to the CloudDeploy server.
878
874
"""
879
875
return request , metadata
880
876
881
- def post_cancel_operation (
882
- self , response : operations_pb2 .CancelOperationRequest
883
- ) -> None :
877
+ def post_cancel_operation (self , response : None ) -> None :
884
878
"""Post-rpc interceptor for cancel_operation
885
879
886
880
Override in a subclass to manipulate the response
@@ -893,17 +887,15 @@ def pre_delete_operation(
893
887
self ,
894
888
request : operations_pb2 .DeleteOperationRequest ,
895
889
metadata : Sequence [Tuple [str , str ]],
896
- ) -> None :
890
+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
897
891
"""Pre-rpc interceptor for delete_operation
898
892
899
893
Override in a subclass to manipulate the request or metadata
900
894
before they are sent to the CloudDeploy server.
901
895
"""
902
896
return request , metadata
903
897
904
- def post_delete_operation (
905
- self , response : operations_pb2 .DeleteOperationRequest
906
- ) -> None :
898
+ def post_delete_operation (self , response : None ) -> None :
907
899
"""Post-rpc interceptor for delete_operation
908
900
909
901
Override in a subclass to manipulate the response
@@ -916,7 +908,7 @@ def pre_get_operation(
916
908
self ,
917
909
request : operations_pb2 .GetOperationRequest ,
918
910
metadata : Sequence [Tuple [str , str ]],
919
- ) -> operations_pb2 .Operation :
911
+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
920
912
"""Pre-rpc interceptor for get_operation
921
913
922
914
Override in a subclass to manipulate the request or metadata
@@ -925,7 +917,7 @@ def pre_get_operation(
925
917
return request , metadata
926
918
927
919
def post_get_operation (
928
- self , response : operations_pb2 .GetOperationRequest
920
+ self , response : operations_pb2 .Operation
929
921
) -> operations_pb2 .Operation :
930
922
"""Post-rpc interceptor for get_operation
931
923
@@ -939,7 +931,7 @@ def pre_list_operations(
939
931
self ,
940
932
request : operations_pb2 .ListOperationsRequest ,
941
933
metadata : Sequence [Tuple [str , str ]],
942
- ) -> operations_pb2 .ListOperationsResponse :
934
+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
943
935
"""Pre-rpc interceptor for list_operations
944
936
945
937
Override in a subclass to manipulate the request or metadata
@@ -948,7 +940,7 @@ def pre_list_operations(
948
940
return request , metadata
949
941
950
942
def post_list_operations (
951
- self , response : operations_pb2 .ListOperationsRequest
943
+ self , response : operations_pb2 .ListOperationsResponse
952
944
) -> operations_pb2 .ListOperationsResponse :
953
945
"""Post-rpc interceptor for list_operations
954
946
@@ -1115,7 +1107,7 @@ class _AbandonRelease(CloudDeployRestStub):
1115
1107
def __hash__ (self ):
1116
1108
return hash ("AbandonRelease" )
1117
1109
1118
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1110
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1119
1111
1120
1112
@classmethod
1121
1113
def _get_unset_required_fields (cls , message_dict ):
@@ -1210,7 +1202,7 @@ class _ApproveRollout(CloudDeployRestStub):
1210
1202
def __hash__ (self ):
1211
1203
return hash ("ApproveRollout" )
1212
1204
1213
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1205
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1214
1206
1215
1207
@classmethod
1216
1208
def _get_unset_required_fields (cls , message_dict ):
@@ -1305,7 +1297,7 @@ class _CreateDeliveryPipeline(CloudDeployRestStub):
1305
1297
def __hash__ (self ):
1306
1298
return hash ("CreateDeliveryPipeline" )
1307
1299
1308
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1300
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1309
1301
"deliveryPipelineId" : "" ,
1310
1302
}
1311
1303
@@ -1405,7 +1397,7 @@ class _CreateRelease(CloudDeployRestStub):
1405
1397
def __hash__ (self ):
1406
1398
return hash ("CreateRelease" )
1407
1399
1408
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1400
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1409
1401
"releaseId" : "" ,
1410
1402
}
1411
1403
@@ -1503,7 +1495,7 @@ class _CreateRollout(CloudDeployRestStub):
1503
1495
def __hash__ (self ):
1504
1496
return hash ("CreateRollout" )
1505
1497
1506
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1498
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1507
1499
"rolloutId" : "" ,
1508
1500
}
1509
1501
@@ -1603,7 +1595,7 @@ class _CreateTarget(CloudDeployRestStub):
1603
1595
def __hash__ (self ):
1604
1596
return hash ("CreateTarget" )
1605
1597
1606
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1598
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1607
1599
"targetId" : "" ,
1608
1600
}
1609
1601
@@ -1701,7 +1693,7 @@ class _DeleteDeliveryPipeline(CloudDeployRestStub):
1701
1693
def __hash__ (self ):
1702
1694
return hash ("DeleteDeliveryPipeline" )
1703
1695
1704
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1696
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1705
1697
1706
1698
@classmethod
1707
1699
def _get_unset_required_fields (cls , message_dict ):
@@ -1790,7 +1782,7 @@ class _DeleteTarget(CloudDeployRestStub):
1790
1782
def __hash__ (self ):
1791
1783
return hash ("DeleteTarget" )
1792
1784
1793
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1785
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1794
1786
1795
1787
@classmethod
1796
1788
def _get_unset_required_fields (cls , message_dict ):
@@ -1877,7 +1869,7 @@ class _GetConfig(CloudDeployRestStub):
1877
1869
def __hash__ (self ):
1878
1870
return hash ("GetConfig" )
1879
1871
1880
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1872
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1881
1873
1882
1874
@classmethod
1883
1875
def _get_unset_required_fields (cls , message_dict ):
@@ -1963,7 +1955,7 @@ class _GetDeliveryPipeline(CloudDeployRestStub):
1963
1955
def __hash__ (self ):
1964
1956
return hash ("GetDeliveryPipeline" )
1965
1957
1966
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1958
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1967
1959
1968
1960
@classmethod
1969
1961
def _get_unset_required_fields (cls , message_dict ):
@@ -2056,7 +2048,7 @@ class _GetJobRun(CloudDeployRestStub):
2056
2048
def __hash__ (self ):
2057
2049
return hash ("GetJobRun" )
2058
2050
2059
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2051
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2060
2052
2061
2053
@classmethod
2062
2054
def _get_unset_required_fields (cls , message_dict ):
@@ -2148,7 +2140,7 @@ class _GetRelease(CloudDeployRestStub):
2148
2140
def __hash__ (self ):
2149
2141
return hash ("GetRelease" )
2150
2142
2151
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2143
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2152
2144
2153
2145
@classmethod
2154
2146
def _get_unset_required_fields (cls , message_dict ):
@@ -2238,7 +2230,7 @@ class _GetRollout(CloudDeployRestStub):
2238
2230
def __hash__ (self ):
2239
2231
return hash ("GetRollout" )
2240
2232
2241
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2233
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2242
2234
2243
2235
@classmethod
2244
2236
def _get_unset_required_fields (cls , message_dict ):
@@ -2330,7 +2322,7 @@ class _GetTarget(CloudDeployRestStub):
2330
2322
def __hash__ (self ):
2331
2323
return hash ("GetTarget" )
2332
2324
2333
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2325
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2334
2326
2335
2327
@classmethod
2336
2328
def _get_unset_required_fields (cls , message_dict ):
@@ -2420,7 +2412,7 @@ class _ListDeliveryPipelines(CloudDeployRestStub):
2420
2412
def __hash__ (self ):
2421
2413
return hash ("ListDeliveryPipelines" )
2422
2414
2423
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2415
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2424
2416
2425
2417
@classmethod
2426
2418
def _get_unset_required_fields (cls , message_dict ):
@@ -2508,7 +2500,7 @@ class _ListJobRuns(CloudDeployRestStub):
2508
2500
def __hash__ (self ):
2509
2501
return hash ("ListJobRuns" )
2510
2502
2511
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2503
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2512
2504
2513
2505
@classmethod
2514
2506
def _get_unset_required_fields (cls , message_dict ):
@@ -2598,7 +2590,7 @@ class _ListReleases(CloudDeployRestStub):
2598
2590
def __hash__ (self ):
2599
2591
return hash ("ListReleases" )
2600
2592
2601
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2593
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2602
2594
2603
2595
@classmethod
2604
2596
def _get_unset_required_fields (cls , message_dict ):
@@ -2684,7 +2676,7 @@ class _ListRollouts(CloudDeployRestStub):
2684
2676
def __hash__ (self ):
2685
2677
return hash ("ListRollouts" )
2686
2678
2687
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2679
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2688
2680
2689
2681
@classmethod
2690
2682
def _get_unset_required_fields (cls , message_dict ):
@@ -2774,7 +2766,7 @@ class _ListTargets(CloudDeployRestStub):
2774
2766
def __hash__ (self ):
2775
2767
return hash ("ListTargets" )
2776
2768
2777
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2769
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2778
2770
2779
2771
@classmethod
2780
2772
def _get_unset_required_fields (cls , message_dict ):
@@ -2860,7 +2852,7 @@ class _RetryJob(CloudDeployRestStub):
2860
2852
def __hash__ (self ):
2861
2853
return hash ("RetryJob" )
2862
2854
2863
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2855
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2864
2856
2865
2857
@classmethod
2866
2858
def _get_unset_required_fields (cls , message_dict ):
@@ -2957,7 +2949,7 @@ class _UpdateDeliveryPipeline(CloudDeployRestStub):
2957
2949
def __hash__ (self ):
2958
2950
return hash ("UpdateDeliveryPipeline" )
2959
2951
2960
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
2952
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
2961
2953
"updateMask" : {},
2962
2954
}
2963
2955
@@ -3057,7 +3049,7 @@ class _UpdateTarget(CloudDeployRestStub):
3057
3049
def __hash__ (self ):
3058
3050
return hash ("UpdateTarget" )
3059
3051
3060
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
3052
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
3061
3053
"updateMask" : {},
3062
3054
}
3063
3055
0 commit comments