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 (
@@ -637,7 +637,7 @@ def pre_get_location(
637637 self ,
638638 request : locations_pb2 .GetLocationRequest ,
639639 metadata : Sequence [Tuple [str , str ]],
640- ) -> locations_pb2 .Location :
640+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
641641 """Pre-rpc interceptor for get_location
642642
643643 Override in a subclass to manipulate the request or metadata
@@ -646,7 +646,7 @@ def pre_get_location(
646646 return request , metadata
647647
648648 def post_get_location (
649- self , response : locations_pb2 .GetLocationRequest
649+ self , response : locations_pb2 .Location
650650 ) -> locations_pb2 .Location :
651651 """Post-rpc interceptor for get_location
652652
@@ -660,7 +660,7 @@ def pre_list_locations(
660660 self ,
661661 request : locations_pb2 .ListLocationsRequest ,
662662 metadata : Sequence [Tuple [str , str ]],
663- ) -> locations_pb2 .ListLocationsResponse :
663+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
664664 """Pre-rpc interceptor for list_locations
665665
666666 Override in a subclass to manipulate the request or metadata
@@ -669,7 +669,7 @@ def pre_list_locations(
669669 return request , metadata
670670
671671 def post_list_locations (
672- self , response : locations_pb2 .ListLocationsRequest
672+ self , response : locations_pb2 .ListLocationsResponse
673673 ) -> locations_pb2 .ListLocationsResponse :
674674 """Post-rpc interceptor for list_locations
675675
@@ -683,17 +683,15 @@ def pre_get_iam_policy(
683683 self ,
684684 request : iam_policy_pb2 .GetIamPolicyRequest ,
685685 metadata : Sequence [Tuple [str , str ]],
686- ) -> policy_pb2 . Policy :
686+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
687687 """Pre-rpc interceptor for get_iam_policy
688688
689689 Override in a subclass to manipulate the request or metadata
690690 before they are sent to the Eventarc server.
691691 """
692692 return request , metadata
693693
694- def post_get_iam_policy (
695- self , response : iam_policy_pb2 .GetIamPolicyRequest
696- ) -> policy_pb2 .Policy :
694+ def post_get_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
697695 """Post-rpc interceptor for get_iam_policy
698696
699697 Override in a subclass to manipulate the response
@@ -706,17 +704,15 @@ def pre_set_iam_policy(
706704 self ,
707705 request : iam_policy_pb2 .SetIamPolicyRequest ,
708706 metadata : Sequence [Tuple [str , str ]],
709- ) -> policy_pb2 . Policy :
707+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
710708 """Pre-rpc interceptor for set_iam_policy
711709
712710 Override in a subclass to manipulate the request or metadata
713711 before they are sent to the Eventarc server.
714712 """
715713 return request , metadata
716714
717- def post_set_iam_policy (
718- self , response : iam_policy_pb2 .SetIamPolicyRequest
719- ) -> policy_pb2 .Policy :
715+ def post_set_iam_policy (self , response : policy_pb2 .Policy ) -> policy_pb2 .Policy :
720716 """Post-rpc interceptor for set_iam_policy
721717
722718 Override in a subclass to manipulate the response
@@ -729,7 +725,7 @@ def pre_test_iam_permissions(
729725 self ,
730726 request : iam_policy_pb2 .TestIamPermissionsRequest ,
731727 metadata : Sequence [Tuple [str , str ]],
732- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
728+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
733729 """Pre-rpc interceptor for test_iam_permissions
734730
735731 Override in a subclass to manipulate the request or metadata
@@ -738,7 +734,7 @@ def pre_test_iam_permissions(
738734 return request , metadata
739735
740736 def post_test_iam_permissions (
741- self , response : iam_policy_pb2 .TestIamPermissionsRequest
737+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
742738 ) -> iam_policy_pb2 .TestIamPermissionsResponse :
743739 """Post-rpc interceptor for test_iam_permissions
744740
@@ -752,17 +748,15 @@ def pre_cancel_operation(
752748 self ,
753749 request : operations_pb2 .CancelOperationRequest ,
754750 metadata : Sequence [Tuple [str , str ]],
755- ) -> None :
751+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
756752 """Pre-rpc interceptor for cancel_operation
757753
758754 Override in a subclass to manipulate the request or metadata
759755 before they are sent to the Eventarc server.
760756 """
761757 return request , metadata
762758
763- def post_cancel_operation (
764- self , response : operations_pb2 .CancelOperationRequest
765- ) -> None :
759+ def post_cancel_operation (self , response : None ) -> None :
766760 """Post-rpc interceptor for cancel_operation
767761
768762 Override in a subclass to manipulate the response
@@ -775,17 +769,15 @@ def pre_delete_operation(
775769 self ,
776770 request : operations_pb2 .DeleteOperationRequest ,
777771 metadata : Sequence [Tuple [str , str ]],
778- ) -> None :
772+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
779773 """Pre-rpc interceptor for delete_operation
780774
781775 Override in a subclass to manipulate the request or metadata
782776 before they are sent to the Eventarc server.
783777 """
784778 return request , metadata
785779
786- def post_delete_operation (
787- self , response : operations_pb2 .DeleteOperationRequest
788- ) -> None :
780+ def post_delete_operation (self , response : None ) -> None :
789781 """Post-rpc interceptor for delete_operation
790782
791783 Override in a subclass to manipulate the response
@@ -798,7 +790,7 @@ def pre_get_operation(
798790 self ,
799791 request : operations_pb2 .GetOperationRequest ,
800792 metadata : Sequence [Tuple [str , str ]],
801- ) -> operations_pb2 .Operation :
793+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
802794 """Pre-rpc interceptor for get_operation
803795
804796 Override in a subclass to manipulate the request or metadata
@@ -807,7 +799,7 @@ def pre_get_operation(
807799 return request , metadata
808800
809801 def post_get_operation (
810- self , response : operations_pb2 .GetOperationRequest
802+ self , response : operations_pb2 .Operation
811803 ) -> operations_pb2 .Operation :
812804 """Post-rpc interceptor for get_operation
813805
@@ -821,7 +813,7 @@ def pre_list_operations(
821813 self ,
822814 request : operations_pb2 .ListOperationsRequest ,
823815 metadata : Sequence [Tuple [str , str ]],
824- ) -> operations_pb2 .ListOperationsResponse :
816+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
825817 """Pre-rpc interceptor for list_operations
826818
827819 Override in a subclass to manipulate the request or metadata
@@ -830,7 +822,7 @@ def pre_list_operations(
830822 return request , metadata
831823
832824 def post_list_operations (
833- self , response : operations_pb2 .ListOperationsRequest
825+ self , response : operations_pb2 .ListOperationsResponse
834826 ) -> operations_pb2 .ListOperationsResponse :
835827 """Post-rpc interceptor for list_operations
836828
@@ -997,7 +989,7 @@ class _CreateChannel(EventarcRestStub):
997989 def __hash__ (self ):
998990 return hash ("CreateChannel" )
999991
1000- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
992+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1001993 "channelId" : "" ,
1002994 "validateOnly" : False ,
1003995 }
@@ -1098,7 +1090,7 @@ class _CreateChannelConnection(EventarcRestStub):
10981090 def __hash__ (self ):
10991091 return hash ("CreateChannelConnection" )
11001092
1101- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1093+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
11021094 "channelConnectionId" : "" ,
11031095 }
11041096
@@ -1200,7 +1192,7 @@ class _CreateTrigger(EventarcRestStub):
12001192 def __hash__ (self ):
12011193 return hash ("CreateTrigger" )
12021194
1203- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1195+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
12041196 "triggerId" : "" ,
12051197 "validateOnly" : False ,
12061198 }
@@ -1301,7 +1293,7 @@ class _DeleteChannel(EventarcRestStub):
13011293 def __hash__ (self ):
13021294 return hash ("DeleteChannel" )
13031295
1304- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1296+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
13051297 "validateOnly" : False ,
13061298 }
13071299
@@ -1392,7 +1384,7 @@ class _DeleteChannelConnection(EventarcRestStub):
13921384 def __hash__ (self ):
13931385 return hash ("DeleteChannelConnection" )
13941386
1395- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1387+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
13961388
13971389 @classmethod
13981390 def _get_unset_required_fields (cls , message_dict ):
@@ -1483,7 +1475,7 @@ class _DeleteTrigger(EventarcRestStub):
14831475 def __hash__ (self ):
14841476 return hash ("DeleteTrigger" )
14851477
1486- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1478+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
14871479 "validateOnly" : False ,
14881480 }
14891481
@@ -1574,7 +1566,7 @@ class _GetChannel(EventarcRestStub):
15741566 def __hash__ (self ):
15751567 return hash ("GetChannel" )
15761568
1577- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1569+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
15781570
15791571 @classmethod
15801572 def _get_unset_required_fields (cls , message_dict ):
@@ -1670,7 +1662,7 @@ class _GetChannelConnection(EventarcRestStub):
16701662 def __hash__ (self ):
16711663 return hash ("GetChannelConnection" )
16721664
1673- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1665+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
16741666
16751667 @classmethod
16761668 def _get_unset_required_fields (cls , message_dict ):
@@ -1767,7 +1759,7 @@ class _GetGoogleChannelConfig(EventarcRestStub):
17671759 def __hash__ (self ):
17681760 return hash ("GetGoogleChannelConfig" )
17691761
1770- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1762+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
17711763
17721764 @classmethod
17731765 def _get_unset_required_fields (cls , message_dict ):
@@ -1865,7 +1857,7 @@ class _GetProvider(EventarcRestStub):
18651857 def __hash__ (self ):
18661858 return hash ("GetProvider" )
18671859
1868- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1860+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
18691861
18701862 @classmethod
18711863 def _get_unset_required_fields (cls , message_dict ):
@@ -1955,7 +1947,7 @@ class _GetTrigger(EventarcRestStub):
19551947 def __hash__ (self ):
19561948 return hash ("GetTrigger" )
19571949
1958- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1950+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
19591951
19601952 @classmethod
19611953 def _get_unset_required_fields (cls , message_dict ):
@@ -2045,7 +2037,7 @@ class _ListChannelConnections(EventarcRestStub):
20452037 def __hash__ (self ):
20462038 return hash ("ListChannelConnections" )
20472039
2048- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2040+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
20492041
20502042 @classmethod
20512043 def _get_unset_required_fields (cls , message_dict ):
@@ -2137,7 +2129,7 @@ class _ListChannels(EventarcRestStub):
21372129 def __hash__ (self ):
21382130 return hash ("ListChannels" )
21392131
2140- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2132+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
21412133
21422134 @classmethod
21432135 def _get_unset_required_fields (cls , message_dict ):
@@ -2225,7 +2217,7 @@ class _ListProviders(EventarcRestStub):
22252217 def __hash__ (self ):
22262218 return hash ("ListProviders" )
22272219
2228- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2220+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
22292221
22302222 @classmethod
22312223 def _get_unset_required_fields (cls , message_dict ):
@@ -2313,7 +2305,7 @@ class _ListTriggers(EventarcRestStub):
23132305 def __hash__ (self ):
23142306 return hash ("ListTriggers" )
23152307
2316- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2308+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
23172309
23182310 @classmethod
23192311 def _get_unset_required_fields (cls , message_dict ):
@@ -2401,7 +2393,7 @@ class _UpdateChannel(EventarcRestStub):
24012393 def __hash__ (self ):
24022394 return hash ("UpdateChannel" )
24032395
2404- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
2396+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
24052397 "validateOnly" : False ,
24062398 }
24072399
@@ -2501,7 +2493,7 @@ class _UpdateGoogleChannelConfig(EventarcRestStub):
25012493 def __hash__ (self ):
25022494 return hash ("UpdateGoogleChannelConfig" )
25032495
2504- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2496+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
25052497
25062498 @classmethod
25072499 def _get_unset_required_fields (cls , message_dict ):
@@ -2609,7 +2601,7 @@ class _UpdateTrigger(EventarcRestStub):
26092601 def __hash__ (self ):
26102602 return hash ("UpdateTrigger" )
26112603
2612- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
2604+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
26132605 "validateOnly" : False ,
26142606 }
26152607
0 commit comments