3333from requests import __version__ as requests_version
3434import dataclasses
3535import re
36- from typing import Callable , Dict , List , Optional , Sequence , Tuple , Union
36+ from typing import Any , Callable , Dict , List , Optional , Sequence , Tuple , Union
3737import warnings
3838
3939try :
@@ -233,17 +233,15 @@ def pre_get_iam_policy(
233233 self ,
234234 request : iam_policy_pb2 .GetIamPolicyRequest ,
235235 metadata : Sequence [Tuple [str , str ]],
236- ) -> policy_pb2 . Policy :
236+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
237237 """Pre-rpc interceptor for get_iam_policy
238238
239239 Override in a subclass to manipulate the request or metadata
240240 before they are sent to the AutoscalingPolicyService server.
241241 """
242242 return request , metadata
243243
244- def post_get_iam_policy (
245- self , response : iam_policy_pb2 .GetIamPolicyRequest
246- ) -> policy_pb2 .Policy :
244+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
247245 """Post-rpc interceptor for get_iam_policy
248246
249247 Override in a subclass to manipulate the response
@@ -256,17 +254,15 @@ def pre_set_iam_policy(
256254 self ,
257255 request : iam_policy_pb2 .SetIamPolicyRequest ,
258256 metadata : Sequence [Tuple [str , str ]],
259- ) -> policy_pb2 . Policy :
257+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
260258 """Pre-rpc interceptor for set_iam_policy
261259
262260 Override in a subclass to manipulate the request or metadata
263261 before they are sent to the AutoscalingPolicyService server.
264262 """
265263 return request , metadata
266264
267- def post_set_iam_policy (
268- self , response : iam_policy_pb2 .SetIamPolicyRequest
269- ) -> policy_pb2 .Policy :
265+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
270266 """Post-rpc interceptor for set_iam_policy
271267
272268 Override in a subclass to manipulate the response
@@ -279,7 +275,7 @@ def pre_test_iam_permissions(
279275 self ,
280276 request : iam_policy_pb2 .TestIamPermissionsRequest ,
281277 metadata : Sequence [Tuple [str , str ]],
282- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
278+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
283279 """Pre-rpc interceptor for test_iam_permissions
284280
285281 Override in a subclass to manipulate the request or metadata
@@ -288,7 +284,7 @@ def pre_test_iam_permissions(
288284 return request , metadata
289285
290286 def post_test_iam_permissions (
291- self , response : iam_policy_pb2 .TestIamPermissionsRequest
287+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
292288 ) -> iam_policy_pb2 .TestIamPermissionsResponse :
293289 """Post-rpc interceptor for test_iam_permissions
294290
@@ -302,17 +298,15 @@ def pre_cancel_operation(
302298 self ,
303299 request : operations_pb2 .CancelOperationRequest ,
304300 metadata : Sequence [Tuple [str , str ]],
305- ) -> None :
301+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
306302 """Pre-rpc interceptor for cancel_operation
307303
308304 Override in a subclass to manipulate the request or metadata
309305 before they are sent to the AutoscalingPolicyService server.
310306 """
311307 return request , metadata
312308
313- def post_cancel_operation (
314- self , response : operations_pb2 .CancelOperationRequest
315- ) -> None :
309+ def post_cancel_operation (self , response : None ) -> None :
316310 """Post-rpc interceptor for cancel_operation
317311
318312 Override in a subclass to manipulate the response
@@ -325,17 +319,15 @@ def pre_delete_operation(
325319 self ,
326320 request : operations_pb2 .DeleteOperationRequest ,
327321 metadata : Sequence [Tuple [str , str ]],
328- ) -> None :
322+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
329323 """Pre-rpc interceptor for delete_operation
330324
331325 Override in a subclass to manipulate the request or metadata
332326 before they are sent to the AutoscalingPolicyService server.
333327 """
334328 return request , metadata
335329
336- def post_delete_operation (
337- self , response : operations_pb2 .DeleteOperationRequest
338- ) -> None :
330+ def post_delete_operation (self , response : None ) -> None :
339331 """Post-rpc interceptor for delete_operation
340332
341333 Override in a subclass to manipulate the response
@@ -348,7 +340,7 @@ def pre_get_operation(
348340 self ,
349341 request : operations_pb2 .GetOperationRequest ,
350342 metadata : Sequence [Tuple [str , str ]],
351- ) -> operations_pb2 .Operation :
343+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
352344 """Pre-rpc interceptor for get_operation
353345
354346 Override in a subclass to manipulate the request or metadata
@@ -357,7 +349,7 @@ def pre_get_operation(
357349 return request , metadata
358350
359351 def post_get_operation (
360- self , response : operations_pb2 .GetOperationRequest
352+ self , response : operations_pb2 .Operation
361353 ) -> operations_pb2 .Operation :
362354 """Post-rpc interceptor for get_operation
363355
@@ -371,7 +363,7 @@ def pre_list_operations(
371363 self ,
372364 request : operations_pb2 .ListOperationsRequest ,
373365 metadata : Sequence [Tuple [str , str ]],
374- ) -> operations_pb2 .ListOperationsResponse :
366+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
375367 """Pre-rpc interceptor for list_operations
376368
377369 Override in a subclass to manipulate the request or metadata
@@ -380,7 +372,7 @@ def pre_list_operations(
380372 return request , metadata
381373
382374 def post_list_operations (
383- self , response : operations_pb2 .ListOperationsRequest
375+ self , response : operations_pb2 .ListOperationsResponse
384376 ) -> operations_pb2 .ListOperationsResponse :
385377 """Post-rpc interceptor for list_operations
386378
@@ -492,7 +484,7 @@ class _CreateAutoscalingPolicy(AutoscalingPolicyServiceRestStub):
492484 def __hash__ (self ):
493485 return hash ("CreateAutoscalingPolicy" )
494486
495- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
487+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
496488
497489 @classmethod
498490 def _get_unset_required_fields (cls , message_dict ):
@@ -598,7 +590,7 @@ class _DeleteAutoscalingPolicy(AutoscalingPolicyServiceRestStub):
598590 def __hash__ (self ):
599591 return hash ("DeleteAutoscalingPolicy" )
600592
601- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
593+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
602594
603595 @classmethod
604596 def _get_unset_required_fields (cls , message_dict ):
@@ -682,7 +674,7 @@ class _GetAutoscalingPolicy(AutoscalingPolicyServiceRestStub):
682674 def __hash__ (self ):
683675 return hash ("GetAutoscalingPolicy" )
684676
685- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
677+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
686678
687679 @classmethod
688680 def _get_unset_required_fields (cls , message_dict ):
@@ -778,7 +770,7 @@ class _ListAutoscalingPolicies(AutoscalingPolicyServiceRestStub):
778770 def __hash__ (self ):
779771 return hash ("ListAutoscalingPolicies" )
780772
781- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
773+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
782774
783775 @classmethod
784776 def _get_unset_required_fields (cls , message_dict ):
@@ -874,7 +866,7 @@ class _UpdateAutoscalingPolicy(AutoscalingPolicyServiceRestStub):
874866 def __hash__ (self ):
875867 return hash ("UpdateAutoscalingPolicy" )
876868
877- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
869+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
878870
879871 @classmethod
880872 def _get_unset_required_fields (cls , message_dict ):
0 commit comments