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 (
@@ -637,7 +637,7 @@ def pre_get_location(
637
637
self ,
638
638
request : locations_pb2 .GetLocationRequest ,
639
639
metadata : Sequence [Tuple [str , str ]],
640
- ) -> locations_pb2 .Location :
640
+ ) -> Tuple [ locations_pb2 .GetLocationRequest , Sequence [ Tuple [ str , str ]]] :
641
641
"""Pre-rpc interceptor for get_location
642
642
643
643
Override in a subclass to manipulate the request or metadata
@@ -646,7 +646,7 @@ def pre_get_location(
646
646
return request , metadata
647
647
648
648
def post_get_location (
649
- self , response : locations_pb2 .GetLocationRequest
649
+ self , response : locations_pb2 .Location
650
650
) -> locations_pb2 .Location :
651
651
"""Post-rpc interceptor for get_location
652
652
@@ -660,7 +660,7 @@ def pre_list_locations(
660
660
self ,
661
661
request : locations_pb2 .ListLocationsRequest ,
662
662
metadata : Sequence [Tuple [str , str ]],
663
- ) -> locations_pb2 .ListLocationsResponse :
663
+ ) -> Tuple [ locations_pb2 .ListLocationsRequest , Sequence [ Tuple [ str , str ]]] :
664
664
"""Pre-rpc interceptor for list_locations
665
665
666
666
Override in a subclass to manipulate the request or metadata
@@ -669,7 +669,7 @@ def pre_list_locations(
669
669
return request , metadata
670
670
671
671
def post_list_locations (
672
- self , response : locations_pb2 .ListLocationsRequest
672
+ self , response : locations_pb2 .ListLocationsResponse
673
673
) -> locations_pb2 .ListLocationsResponse :
674
674
"""Post-rpc interceptor for list_locations
675
675
@@ -683,17 +683,15 @@ def pre_get_iam_policy(
683
683
self ,
684
684
request : iam_policy_pb2 .GetIamPolicyRequest ,
685
685
metadata : Sequence [Tuple [str , str ]],
686
- ) -> policy_pb2 . Policy :
686
+ ) -> Tuple [ iam_policy_pb2 . GetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
687
687
"""Pre-rpc interceptor for get_iam_policy
688
688
689
689
Override in a subclass to manipulate the request or metadata
690
690
before they are sent to the Eventarc server.
691
691
"""
692
692
return request , metadata
693
693
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 :
697
695
"""Post-rpc interceptor for get_iam_policy
698
696
699
697
Override in a subclass to manipulate the response
@@ -706,17 +704,15 @@ def pre_set_iam_policy(
706
704
self ,
707
705
request : iam_policy_pb2 .SetIamPolicyRequest ,
708
706
metadata : Sequence [Tuple [str , str ]],
709
- ) -> policy_pb2 . Policy :
707
+ ) -> Tuple [ iam_policy_pb2 . SetIamPolicyRequest , Sequence [ Tuple [ str , str ]]] :
710
708
"""Pre-rpc interceptor for set_iam_policy
711
709
712
710
Override in a subclass to manipulate the request or metadata
713
711
before they are sent to the Eventarc server.
714
712
"""
715
713
return request , metadata
716
714
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 :
720
716
"""Post-rpc interceptor for set_iam_policy
721
717
722
718
Override in a subclass to manipulate the response
@@ -729,7 +725,7 @@ def pre_test_iam_permissions(
729
725
self ,
730
726
request : iam_policy_pb2 .TestIamPermissionsRequest ,
731
727
metadata : Sequence [Tuple [str , str ]],
732
- ) -> iam_policy_pb2 .TestIamPermissionsResponse :
728
+ ) -> Tuple [ iam_policy_pb2 .TestIamPermissionsRequest , Sequence [ Tuple [ str , str ]]] :
733
729
"""Pre-rpc interceptor for test_iam_permissions
734
730
735
731
Override in a subclass to manipulate the request or metadata
@@ -738,7 +734,7 @@ def pre_test_iam_permissions(
738
734
return request , metadata
739
735
740
736
def post_test_iam_permissions (
741
- self , response : iam_policy_pb2 .TestIamPermissionsRequest
737
+ self , response : iam_policy_pb2 .TestIamPermissionsResponse
742
738
) -> iam_policy_pb2 .TestIamPermissionsResponse :
743
739
"""Post-rpc interceptor for test_iam_permissions
744
740
@@ -752,17 +748,15 @@ def pre_cancel_operation(
752
748
self ,
753
749
request : operations_pb2 .CancelOperationRequest ,
754
750
metadata : Sequence [Tuple [str , str ]],
755
- ) -> None :
751
+ ) -> Tuple [ operations_pb2 . CancelOperationRequest , Sequence [ Tuple [ str , str ]]] :
756
752
"""Pre-rpc interceptor for cancel_operation
757
753
758
754
Override in a subclass to manipulate the request or metadata
759
755
before they are sent to the Eventarc server.
760
756
"""
761
757
return request , metadata
762
758
763
- def post_cancel_operation (
764
- self , response : operations_pb2 .CancelOperationRequest
765
- ) -> None :
759
+ def post_cancel_operation (self , response : None ) -> None :
766
760
"""Post-rpc interceptor for cancel_operation
767
761
768
762
Override in a subclass to manipulate the response
@@ -775,17 +769,15 @@ def pre_delete_operation(
775
769
self ,
776
770
request : operations_pb2 .DeleteOperationRequest ,
777
771
metadata : Sequence [Tuple [str , str ]],
778
- ) -> None :
772
+ ) -> Tuple [ operations_pb2 . DeleteOperationRequest , Sequence [ Tuple [ str , str ]]] :
779
773
"""Pre-rpc interceptor for delete_operation
780
774
781
775
Override in a subclass to manipulate the request or metadata
782
776
before they are sent to the Eventarc server.
783
777
"""
784
778
return request , metadata
785
779
786
- def post_delete_operation (
787
- self , response : operations_pb2 .DeleteOperationRequest
788
- ) -> None :
780
+ def post_delete_operation (self , response : None ) -> None :
789
781
"""Post-rpc interceptor for delete_operation
790
782
791
783
Override in a subclass to manipulate the response
@@ -798,7 +790,7 @@ def pre_get_operation(
798
790
self ,
799
791
request : operations_pb2 .GetOperationRequest ,
800
792
metadata : Sequence [Tuple [str , str ]],
801
- ) -> operations_pb2 .Operation :
793
+ ) -> Tuple [ operations_pb2 .GetOperationRequest , Sequence [ Tuple [ str , str ]]] :
802
794
"""Pre-rpc interceptor for get_operation
803
795
804
796
Override in a subclass to manipulate the request or metadata
@@ -807,7 +799,7 @@ def pre_get_operation(
807
799
return request , metadata
808
800
809
801
def post_get_operation (
810
- self , response : operations_pb2 .GetOperationRequest
802
+ self , response : operations_pb2 .Operation
811
803
) -> operations_pb2 .Operation :
812
804
"""Post-rpc interceptor for get_operation
813
805
@@ -821,7 +813,7 @@ def pre_list_operations(
821
813
self ,
822
814
request : operations_pb2 .ListOperationsRequest ,
823
815
metadata : Sequence [Tuple [str , str ]],
824
- ) -> operations_pb2 .ListOperationsResponse :
816
+ ) -> Tuple [ operations_pb2 .ListOperationsRequest , Sequence [ Tuple [ str , str ]]] :
825
817
"""Pre-rpc interceptor for list_operations
826
818
827
819
Override in a subclass to manipulate the request or metadata
@@ -830,7 +822,7 @@ def pre_list_operations(
830
822
return request , metadata
831
823
832
824
def post_list_operations (
833
- self , response : operations_pb2 .ListOperationsRequest
825
+ self , response : operations_pb2 .ListOperationsResponse
834
826
) -> operations_pb2 .ListOperationsResponse :
835
827
"""Post-rpc interceptor for list_operations
836
828
@@ -997,7 +989,7 @@ class _CreateChannel(EventarcRestStub):
997
989
def __hash__ (self ):
998
990
return hash ("CreateChannel" )
999
991
1000
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
992
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1001
993
"channelId" : "" ,
1002
994
"validateOnly" : False ,
1003
995
}
@@ -1098,7 +1090,7 @@ class _CreateChannelConnection(EventarcRestStub):
1098
1090
def __hash__ (self ):
1099
1091
return hash ("CreateChannelConnection" )
1100
1092
1101
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1093
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1102
1094
"channelConnectionId" : "" ,
1103
1095
}
1104
1096
@@ -1200,7 +1192,7 @@ class _CreateTrigger(EventarcRestStub):
1200
1192
def __hash__ (self ):
1201
1193
return hash ("CreateTrigger" )
1202
1194
1203
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1195
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1204
1196
"triggerId" : "" ,
1205
1197
"validateOnly" : False ,
1206
1198
}
@@ -1301,7 +1293,7 @@ class _DeleteChannel(EventarcRestStub):
1301
1293
def __hash__ (self ):
1302
1294
return hash ("DeleteChannel" )
1303
1295
1304
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1296
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1305
1297
"validateOnly" : False ,
1306
1298
}
1307
1299
@@ -1392,7 +1384,7 @@ class _DeleteChannelConnection(EventarcRestStub):
1392
1384
def __hash__ (self ):
1393
1385
return hash ("DeleteChannelConnection" )
1394
1386
1395
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1387
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1396
1388
1397
1389
@classmethod
1398
1390
def _get_unset_required_fields (cls , message_dict ):
@@ -1483,7 +1475,7 @@ class _DeleteTrigger(EventarcRestStub):
1483
1475
def __hash__ (self ):
1484
1476
return hash ("DeleteTrigger" )
1485
1477
1486
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
1478
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
1487
1479
"validateOnly" : False ,
1488
1480
}
1489
1481
@@ -1574,7 +1566,7 @@ class _GetChannel(EventarcRestStub):
1574
1566
def __hash__ (self ):
1575
1567
return hash ("GetChannel" )
1576
1568
1577
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1569
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1578
1570
1579
1571
@classmethod
1580
1572
def _get_unset_required_fields (cls , message_dict ):
@@ -1670,7 +1662,7 @@ class _GetChannelConnection(EventarcRestStub):
1670
1662
def __hash__ (self ):
1671
1663
return hash ("GetChannelConnection" )
1672
1664
1673
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1665
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1674
1666
1675
1667
@classmethod
1676
1668
def _get_unset_required_fields (cls , message_dict ):
@@ -1767,7 +1759,7 @@ class _GetGoogleChannelConfig(EventarcRestStub):
1767
1759
def __hash__ (self ):
1768
1760
return hash ("GetGoogleChannelConfig" )
1769
1761
1770
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1762
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1771
1763
1772
1764
@classmethod
1773
1765
def _get_unset_required_fields (cls , message_dict ):
@@ -1865,7 +1857,7 @@ class _GetProvider(EventarcRestStub):
1865
1857
def __hash__ (self ):
1866
1858
return hash ("GetProvider" )
1867
1859
1868
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1860
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1869
1861
1870
1862
@classmethod
1871
1863
def _get_unset_required_fields (cls , message_dict ):
@@ -1955,7 +1947,7 @@ class _GetTrigger(EventarcRestStub):
1955
1947
def __hash__ (self ):
1956
1948
return hash ("GetTrigger" )
1957
1949
1958
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
1950
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
1959
1951
1960
1952
@classmethod
1961
1953
def _get_unset_required_fields (cls , message_dict ):
@@ -2045,7 +2037,7 @@ class _ListChannelConnections(EventarcRestStub):
2045
2037
def __hash__ (self ):
2046
2038
return hash ("ListChannelConnections" )
2047
2039
2048
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2040
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2049
2041
2050
2042
@classmethod
2051
2043
def _get_unset_required_fields (cls , message_dict ):
@@ -2137,7 +2129,7 @@ class _ListChannels(EventarcRestStub):
2137
2129
def __hash__ (self ):
2138
2130
return hash ("ListChannels" )
2139
2131
2140
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2132
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2141
2133
2142
2134
@classmethod
2143
2135
def _get_unset_required_fields (cls , message_dict ):
@@ -2225,7 +2217,7 @@ class _ListProviders(EventarcRestStub):
2225
2217
def __hash__ (self ):
2226
2218
return hash ("ListProviders" )
2227
2219
2228
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2220
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2229
2221
2230
2222
@classmethod
2231
2223
def _get_unset_required_fields (cls , message_dict ):
@@ -2313,7 +2305,7 @@ class _ListTriggers(EventarcRestStub):
2313
2305
def __hash__ (self ):
2314
2306
return hash ("ListTriggers" )
2315
2307
2316
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2308
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2317
2309
2318
2310
@classmethod
2319
2311
def _get_unset_required_fields (cls , message_dict ):
@@ -2401,7 +2393,7 @@ class _UpdateChannel(EventarcRestStub):
2401
2393
def __hash__ (self ):
2402
2394
return hash ("UpdateChannel" )
2403
2395
2404
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
2396
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
2405
2397
"validateOnly" : False ,
2406
2398
}
2407
2399
@@ -2501,7 +2493,7 @@ class _UpdateGoogleChannelConfig(EventarcRestStub):
2501
2493
def __hash__ (self ):
2502
2494
return hash ("UpdateGoogleChannelConfig" )
2503
2495
2504
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {}
2496
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {}
2505
2497
2506
2498
@classmethod
2507
2499
def _get_unset_required_fields (cls , message_dict ):
@@ -2609,7 +2601,7 @@ class _UpdateTrigger(EventarcRestStub):
2609
2601
def __hash__ (self ):
2610
2602
return hash ("UpdateTrigger" )
2611
2603
2612
- __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , str ] = {
2604
+ __REQUIRED_FIELDS_DEFAULT_VALUES : Dict [str , Any ] = {
2613
2605
"validateOnly" : False ,
2614
2606
}
2615
2607
0 commit comments