1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import sys
1516from typing import Optional , List , Union
1617
17- from overrides import overrides
18+ if sys .version_info >= (3 , 12 ):
19+ from typing import override
20+ else :
21+ from overrides import overrides as override
22+
1823from google .api_core .client_options import ClientOptions
1924from google .api_core .operation import Operation
2025from google .auth .credentials import Credentials
@@ -78,39 +83,39 @@ def __init__(
7883 region ,
7984 )
8085
81- @overrides
86+ @override
8287 def region (self ) -> CloudRegion :
8388 return self ._impl .region ()
8489
85- @overrides
90+ @override
8691 def create_topic (self , topic : Topic ) -> Topic :
8792 return self ._impl .create_topic (topic )
8893
89- @overrides
94+ @override
9095 def get_topic (self , topic_path : TopicPath ) -> Topic :
9196 return self ._impl .get_topic (topic_path )
9297
93- @overrides
98+ @override
9499 def get_topic_partition_count (self , topic_path : TopicPath ) -> int :
95100 return self ._impl .get_topic_partition_count (topic_path )
96101
97- @overrides
102+ @override
98103 def list_topics (self , location_path : LocationPath ) -> List [Topic ]:
99104 return self ._impl .list_topics (location_path )
100105
101- @overrides
106+ @override
102107 def update_topic (self , topic : Topic , update_mask : FieldMask ) -> Topic :
103108 return self ._impl .update_topic (topic , update_mask )
104109
105- @overrides
110+ @override
106111 def delete_topic (self , topic_path : TopicPath ):
107112 return self ._impl .delete_topic (topic_path )
108113
109- @overrides
114+ @override
110115 def list_topic_subscriptions (self , topic_path : TopicPath ) -> List [SubscriptionPath ]:
111116 return self ._impl .list_topic_subscriptions (topic_path )
112117
113- @overrides
118+ @override
114119 def create_subscription (
115120 self ,
116121 subscription : Subscription ,
@@ -119,55 +124,55 @@ def create_subscription(
119124 ) -> Subscription :
120125 return self ._impl .create_subscription (subscription , target , starting_offset )
121126
122- @overrides
127+ @override
123128 def get_subscription (self , subscription_path : SubscriptionPath ) -> Subscription :
124129 return self ._impl .get_subscription (subscription_path )
125130
126- @overrides
131+ @override
127132 def list_subscriptions (self , location_path : LocationPath ) -> List [Subscription ]:
128133 return self ._impl .list_subscriptions (location_path )
129134
130- @overrides
135+ @override
131136 def update_subscription (
132137 self , subscription : Subscription , update_mask : FieldMask
133138 ) -> Subscription :
134139 return self ._impl .update_subscription (subscription , update_mask )
135140
136- @overrides
141+ @override
137142 def seek_subscription (
138143 self ,
139144 subscription_path : SubscriptionPath ,
140145 target : Union [BacklogLocation , PublishTime , EventTime ],
141146 ) -> Operation :
142147 return self ._impl .seek_subscription (subscription_path , target )
143148
144- @overrides
149+ @override
145150 def delete_subscription (self , subscription_path : SubscriptionPath ):
146151 return self ._impl .delete_subscription (subscription_path )
147152
148- @overrides
153+ @override
149154 def create_reservation (self , reservation : Reservation ) -> Reservation :
150155 return self ._impl .create_reservation (reservation )
151156
152- @overrides
157+ @override
153158 def get_reservation (self , reservation_path : ReservationPath ) -> Reservation :
154159 return self ._impl .get_reservation (reservation_path )
155160
156- @overrides
161+ @override
157162 def list_reservations (self , location_path : LocationPath ) -> List [Reservation ]:
158163 return self ._impl .list_reservations (location_path )
159164
160- @overrides
165+ @override
161166 def update_reservation (
162167 self , reservation : Reservation , update_mask : FieldMask
163168 ) -> Reservation :
164169 return self ._impl .update_reservation (reservation , update_mask )
165170
166- @overrides
171+ @override
167172 def delete_reservation (self , reservation_path : ReservationPath ):
168173 return self ._impl .delete_reservation (reservation_path )
169174
170- @overrides
175+ @override
171176 def list_reservation_topics (
172177 self , reservation_path : ReservationPath
173178 ) -> List [TopicPath ]:
0 commit comments