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 (
@@ -217,7 +217,7 @@ def pre_get_location(
217217 self ,
218218 request : locations_pb2 .GetLocationRequest ,
219219 metadata : Sequence [Tuple [str , str ]],
220- ) -> locations_pb2 .Location :
220+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
221221 """Pre-rpc interceptor for get_location
222222
223223 Override in a subclass to manipulate the request or metadata
@@ -226,7 +226,7 @@ def pre_get_location(
226226 return request , metadata
227227
228228 def post_get_location (
229- self , response : locations_pb2 .GetLocationRequest
229+ self , response : locations_pb2 .Location
230230 ) -> locations_pb2 .Location :
231231 """Post-rpc interceptor for get_location
232232
@@ -240,7 +240,7 @@ def pre_list_locations(
240240 self ,
241241 request : locations_pb2 .ListLocationsRequest ,
242242 metadata : Sequence [Tuple [str , str ]],
243- ) -> locations_pb2 .ListLocationsResponse :
243+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
244244 """Pre-rpc interceptor for list_locations
245245
246246 Override in a subclass to manipulate the request or metadata
@@ -249,7 +249,7 @@ def pre_list_locations(
249249 return request , metadata
250250
251251 def post_list_locations (
252- self , response : locations_pb2 .ListLocationsRequest
252+ self , response : locations_pb2 .ListLocationsResponse
253253 ) -> locations_pb2 .ListLocationsResponse :
254254 """Post-rpc interceptor for list_locations
255255
@@ -263,17 +263,15 @@ def pre_get_iam_policy(
263263 self ,
264264 request : iam_policy_pb2 .GetIamPolicyRequest ,
265265 metadata : Sequence [Tuple [str , str ]],
266- ) -> policy_pb2 . Policy :
266+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
267267 """Pre-rpc interceptor for get_iam_policy
268268
269269 Override in a subclass to manipulate the request or metadata
270270 before they are sent to the ClientGatewaysService server.
271271 """
272272 return request , metadata
273273
274- def post_get_iam_policy (
275- self , response : iam_policy_pb2 .GetIamPolicyRequest
276- ) -> policy_pb2 .Policy :
274+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
277275 """Post-rpc interceptor for get_iam_policy
278276
279277 Override in a subclass to manipulate the response
@@ -286,17 +284,15 @@ def pre_set_iam_policy(
286284 self ,
287285 request : iam_policy_pb2 .SetIamPolicyRequest ,
288286 metadata : Sequence [Tuple [str , str ]],
289- ) -> policy_pb2 . Policy :
287+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
290288 """Pre-rpc interceptor for set_iam_policy
291289
292290 Override in a subclass to manipulate the request or metadata
293291 before they are sent to the ClientGatewaysService server.
294292 """
295293 return request , metadata
296294
297- def post_set_iam_policy (
298- self , response : iam_policy_pb2 .SetIamPolicyRequest
299- ) -> policy_pb2 .Policy :
295+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
300296 """Post-rpc interceptor for set_iam_policy
301297
302298 Override in a subclass to manipulate the response
@@ -309,7 +305,7 @@ def pre_test_iam_permissions(
309305 self ,
310306 request : iam_policy_pb2 .TestIamPermissionsRequest ,
311307 metadata : Sequence [Tuple [str , str ]],
312- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
308+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
313309 """Pre-rpc interceptor for test_iam_permissions
314310
315311 Override in a subclass to manipulate the request or metadata
@@ -318,7 +314,7 @@ def pre_test_iam_permissions(
318314 return request , metadata
319315
320316 def post_test_iam_permissions (
321- self , response : iam_policy_pb2 .TestIamPermissionsRequest
317+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
322318 ) -> iam_policy_pb2 .TestIamPermissionsResponse :
323319 """Post-rpc interceptor for test_iam_permissions
324320
@@ -332,17 +328,15 @@ def pre_cancel_operation(
332328 self ,
333329 request : operations_pb2 .CancelOperationRequest ,
334330 metadata : Sequence [Tuple [str , str ]],
335- ) -> None :
331+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
336332 """Pre-rpc interceptor for cancel_operation
337333
338334 Override in a subclass to manipulate the request or metadata
339335 before they are sent to the ClientGatewaysService server.
340336 """
341337 return request , metadata
342338
343- def post_cancel_operation (
344- self , response : operations_pb2 .CancelOperationRequest
345- ) -> None :
339+ def post_cancel_operation (self , response : None ) -> None :
346340 """Post-rpc interceptor for cancel_operation
347341
348342 Override in a subclass to manipulate the response
@@ -355,17 +349,15 @@ def pre_delete_operation(
355349 self ,
356350 request : operations_pb2 .DeleteOperationRequest ,
357351 metadata : Sequence [Tuple [str , str ]],
358- ) -> None :
352+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
359353 """Pre-rpc interceptor for delete_operation
360354
361355 Override in a subclass to manipulate the request or metadata
362356 before they are sent to the ClientGatewaysService server.
363357 """
364358 return request , metadata
365359
366- def post_delete_operation (
367- self , response : operations_pb2 .DeleteOperationRequest
368- ) -> None :
360+ def post_delete_operation (self , response : None ) -> None :
369361 """Post-rpc interceptor for delete_operation
370362
371363 Override in a subclass to manipulate the response
@@ -378,7 +370,7 @@ def pre_get_operation(
378370 self ,
379371 request : operations_pb2 .GetOperationRequest ,
380372 metadata : Sequence [Tuple [str , str ]],
381- ) -> operations_pb2 .Operation :
373+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
382374 """Pre-rpc interceptor for get_operation
383375
384376 Override in a subclass to manipulate the request or metadata
@@ -387,7 +379,7 @@ def pre_get_operation(
387379 return request , metadata
388380
389381 def post_get_operation (
390- self , response : operations_pb2 .GetOperationRequest
382+ self , response : operations_pb2 .Operation
391383 ) -> operations_pb2 .Operation :
392384 """Post-rpc interceptor for get_operation
393385
@@ -401,7 +393,7 @@ def pre_list_operations(
401393 self ,
402394 request : operations_pb2 .ListOperationsRequest ,
403395 metadata : Sequence [Tuple [str , str ]],
404- ) -> operations_pb2 .ListOperationsResponse :
396+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
405397 """Pre-rpc interceptor for list_operations
406398
407399 Override in a subclass to manipulate the request or metadata
@@ -410,7 +402,7 @@ def pre_list_operations(
410402 return request , metadata
411403
412404 def post_list_operations (
413- self , response : operations_pb2 .ListOperationsRequest
405+ self , response : operations_pb2 .ListOperationsResponse
414406 ) -> operations_pb2 .ListOperationsResponse :
415407 """Post-rpc interceptor for list_operations
416408
@@ -585,7 +577,7 @@ class _CreateClientGateway(ClientGatewaysServiceRestStub):
585577 def __hash__ (self ):
586578 return hash ("CreateClientGateway" )
587579
588- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
580+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
589581
590582 @classmethod
591583 def _get_unset_required_fields (cls , message_dict ):
@@ -683,7 +675,7 @@ class _DeleteClientGateway(ClientGatewaysServiceRestStub):
683675 def __hash__ (self ):
684676 return hash ("DeleteClientGateway" )
685677
686- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
678+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
687679
688680 @classmethod
689681 def _get_unset_required_fields (cls , message_dict ):
@@ -772,7 +764,7 @@ class _GetClientGateway(ClientGatewaysServiceRestStub):
772764 def __hash__ (self ):
773765 return hash ("GetClientGateway" )
774766
775- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
767+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
776768
777769 @classmethod
778770 def _get_unset_required_fields (cls , message_dict ):
@@ -862,7 +854,7 @@ class _ListClientGateways(ClientGatewaysServiceRestStub):
862854 def __hash__ (self ):
863855 return hash ("ListClientGateways" )
864856
865- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
857+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
866858
867859 @classmethod
868860 def _get_unset_required_fields (cls , message_dict ):
0 commit comments