1717import dataclasses
1818import json # type: ignore
1919import re
20- from typing import Callable , Dict , List , Optional , Sequence , Tuple , Union
20+ from typing import Any , Callable , Dict , List , Optional , Sequence , Tuple , Union
2121import warnings
2222
2323from google .api_core import gapic_v1 , path_template , rest_helpers , rest_streaming
@@ -203,7 +203,7 @@ def pre_get_location(
203203 self ,
204204 request : locations_pb2 .GetLocationRequest ,
205205 metadata : Sequence [Tuple [str , str ]],
206- ) -> locations_pb2 .Location :
206+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
207207 """Pre-rpc interceptor for get_location
208208
209209 Override in a subclass to manipulate the request or metadata
@@ -212,7 +212,7 @@ def pre_get_location(
212212 return request , metadata
213213
214214 def post_get_location (
215- self , response : locations_pb2 .GetLocationRequest
215+ self , response : locations_pb2 .Location
216216 ) -> locations_pb2 .Location :
217217 """Post-rpc interceptor for get_location
218218
@@ -226,7 +226,7 @@ def pre_list_locations(
226226 self ,
227227 request : locations_pb2 .ListLocationsRequest ,
228228 metadata : Sequence [Tuple [str , str ]],
229- ) -> locations_pb2 .ListLocationsResponse :
229+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
230230 """Pre-rpc interceptor for list_locations
231231
232232 Override in a subclass to manipulate the request or metadata
@@ -235,7 +235,7 @@ def pre_list_locations(
235235 return request , metadata
236236
237237 def post_list_locations (
238- self , response : locations_pb2 .ListLocationsRequest
238+ self , response : locations_pb2 .ListLocationsResponse
239239 ) -> locations_pb2 .ListLocationsResponse :
240240 """Post-rpc interceptor for list_locations
241241
@@ -249,17 +249,15 @@ def pre_get_iam_policy(
249249 self ,
250250 request : iam_policy_pb2 .GetIamPolicyRequest ,
251251 metadata : Sequence [Tuple [str , str ]],
252- ) -> policy_pb2 . Policy :
252+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
253253 """Pre-rpc interceptor for get_iam_policy
254254
255255 Override in a subclass to manipulate the request or metadata
256256 before they are sent to the EkmService server.
257257 """
258258 return request , metadata
259259
260- def post_get_iam_policy (
261- self , response : iam_policy_pb2 .GetIamPolicyRequest
262- ) -> policy_pb2 .Policy :
260+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
263261 """Post-rpc interceptor for get_iam_policy
264262
265263 Override in a subclass to manipulate the response
@@ -272,17 +270,15 @@ def pre_set_iam_policy(
272270 self ,
273271 request : iam_policy_pb2 .SetIamPolicyRequest ,
274272 metadata : Sequence [Tuple [str , str ]],
275- ) -> policy_pb2 . Policy :
273+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
276274 """Pre-rpc interceptor for set_iam_policy
277275
278276 Override in a subclass to manipulate the request or metadata
279277 before they are sent to the EkmService server.
280278 """
281279 return request , metadata
282280
283- def post_set_iam_policy (
284- self , response : iam_policy_pb2 .SetIamPolicyRequest
285- ) -> policy_pb2 .Policy :
281+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
286282 """Post-rpc interceptor for set_iam_policy
287283
288284 Override in a subclass to manipulate the response
@@ -295,7 +291,7 @@ def pre_test_iam_permissions(
295291 self ,
296292 request : iam_policy_pb2 .TestIamPermissionsRequest ,
297293 metadata : Sequence [Tuple [str , str ]],
298- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
294+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
299295 """Pre-rpc interceptor for test_iam_permissions
300296
301297 Override in a subclass to manipulate the request or metadata
@@ -304,7 +300,7 @@ def pre_test_iam_permissions(
304300 return request , metadata
305301
306302 def post_test_iam_permissions (
307- self , response : iam_policy_pb2 .TestIamPermissionsRequest
303+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
308304 ) -> iam_policy_pb2 .TestIamPermissionsResponse :
309305 """Post-rpc interceptor for test_iam_permissions
310306
@@ -420,7 +416,7 @@ class _CreateEkmConnection(EkmServiceRestStub):
420416 def __hash__ (self ):
421417 return hash ("CreateEkmConnection" )
422418
423- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
419+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
424420 "ekmConnectionId" : "" ,
425421 }
426422
@@ -533,7 +529,7 @@ class _GetEkmConnection(EkmServiceRestStub):
533529 def __hash__ (self ):
534530 return hash ("GetEkmConnection" )
535531
536- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
532+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
537533
538534 @classmethod
539535 def _get_unset_required_fields (cls , message_dict ):
@@ -635,7 +631,7 @@ class _ListEkmConnections(EkmServiceRestStub):
635631 def __hash__ (self ):
636632 return hash ("ListEkmConnections" )
637633
638- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
634+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
639635
640636 @classmethod
641637 def _get_unset_required_fields (cls , message_dict ):
@@ -727,7 +723,7 @@ class _UpdateEkmConnection(EkmServiceRestStub):
727723 def __hash__ (self ):
728724 return hash ("UpdateEkmConnection" )
729725
730- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
726+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
731727 "updateMask" : {},
732728 }
733729
0 commit comments