Skip to content

Commit 7a5a5b7

Browse files
chore: Update gapic-generator-python to v1.8.5 (#525)
* chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: googleapis/googleapis-gen@1907294 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1bcbae1 commit 7a5a5b7

File tree

15 files changed

+141
-173
lines changed

15 files changed

+141
-173
lines changed

packages/google-cloud-dataproc/google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/rest.py

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from requests import __version__ as requests_version
3434
import dataclasses
3535
import re
36-
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
36+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
3737
import warnings
3838

3939
try:
@@ -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):

packages/google-cloud-dataproc/google/cloud/dataproc_v1/services/batch_controller/transports/rest.py

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from requests import __version__ as requests_version
3535
import dataclasses
3636
import re
37-
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
37+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
3838
import warnings
3939

4040
try:
@@ -184,17 +184,15 @@ def pre_get_iam_policy(
184184
self,
185185
request: iam_policy_pb2.GetIamPolicyRequest,
186186
metadata: Sequence[Tuple[str, str]],
187-
) -> policy_pb2.Policy:
187+
) -> Tuple[iam_policy_pb2.GetIamPolicyRequest, Sequence[Tuple[str, str]]]:
188188
"""Pre-rpc interceptor for get_iam_policy
189189
190190
Override in a subclass to manipulate the request or metadata
191191
before they are sent to the BatchController server.
192192
"""
193193
return request, metadata
194194

195-
def post_get_iam_policy(
196-
self, response: iam_policy_pb2.GetIamPolicyRequest
197-
) -> policy_pb2.Policy:
195+
def post_get_iam_policy(self, response: policy_pb2.Policy) -> policy_pb2.Policy:
198196
"""Post-rpc interceptor for get_iam_policy
199197
200198
Override in a subclass to manipulate the response
@@ -207,17 +205,15 @@ def pre_set_iam_policy(
207205
self,
208206
request: iam_policy_pb2.SetIamPolicyRequest,
209207
metadata: Sequence[Tuple[str, str]],
210-
) -> policy_pb2.Policy:
208+
) -> Tuple[iam_policy_pb2.SetIamPolicyRequest, Sequence[Tuple[str, str]]]:
211209
"""Pre-rpc interceptor for set_iam_policy
212210
213211
Override in a subclass to manipulate the request or metadata
214212
before they are sent to the BatchController server.
215213
"""
216214
return request, metadata
217215

218-
def post_set_iam_policy(
219-
self, response: iam_policy_pb2.SetIamPolicyRequest
220-
) -> policy_pb2.Policy:
216+
def post_set_iam_policy(self, response: policy_pb2.Policy) -> policy_pb2.Policy:
221217
"""Post-rpc interceptor for set_iam_policy
222218
223219
Override in a subclass to manipulate the response
@@ -230,7 +226,7 @@ def pre_test_iam_permissions(
230226
self,
231227
request: iam_policy_pb2.TestIamPermissionsRequest,
232228
metadata: Sequence[Tuple[str, str]],
233-
) -> iam_policy_pb2.TestIamPermissionsResponse:
229+
) -> Tuple[iam_policy_pb2.TestIamPermissionsRequest, Sequence[Tuple[str, str]]]:
234230
"""Pre-rpc interceptor for test_iam_permissions
235231
236232
Override in a subclass to manipulate the request or metadata
@@ -239,7 +235,7 @@ def pre_test_iam_permissions(
239235
return request, metadata
240236

241237
def post_test_iam_permissions(
242-
self, response: iam_policy_pb2.TestIamPermissionsRequest
238+
self, response: iam_policy_pb2.TestIamPermissionsResponse
243239
) -> iam_policy_pb2.TestIamPermissionsResponse:
244240
"""Post-rpc interceptor for test_iam_permissions
245241
@@ -253,17 +249,15 @@ def pre_cancel_operation(
253249
self,
254250
request: operations_pb2.CancelOperationRequest,
255251
metadata: Sequence[Tuple[str, str]],
256-
) -> None:
252+
) -> Tuple[operations_pb2.CancelOperationRequest, Sequence[Tuple[str, str]]]:
257253
"""Pre-rpc interceptor for cancel_operation
258254
259255
Override in a subclass to manipulate the request or metadata
260256
before they are sent to the BatchController server.
261257
"""
262258
return request, metadata
263259

264-
def post_cancel_operation(
265-
self, response: operations_pb2.CancelOperationRequest
266-
) -> None:
260+
def post_cancel_operation(self, response: None) -> None:
267261
"""Post-rpc interceptor for cancel_operation
268262
269263
Override in a subclass to manipulate the response
@@ -276,17 +270,15 @@ def pre_delete_operation(
276270
self,
277271
request: operations_pb2.DeleteOperationRequest,
278272
metadata: Sequence[Tuple[str, str]],
279-
) -> None:
273+
) -> Tuple[operations_pb2.DeleteOperationRequest, Sequence[Tuple[str, str]]]:
280274
"""Pre-rpc interceptor for delete_operation
281275
282276
Override in a subclass to manipulate the request or metadata
283277
before they are sent to the BatchController server.
284278
"""
285279
return request, metadata
286280

287-
def post_delete_operation(
288-
self, response: operations_pb2.DeleteOperationRequest
289-
) -> None:
281+
def post_delete_operation(self, response: None) -> None:
290282
"""Post-rpc interceptor for delete_operation
291283
292284
Override in a subclass to manipulate the response
@@ -299,7 +291,7 @@ def pre_get_operation(
299291
self,
300292
request: operations_pb2.GetOperationRequest,
301293
metadata: Sequence[Tuple[str, str]],
302-
) -> operations_pb2.Operation:
294+
) -> Tuple[operations_pb2.GetOperationRequest, Sequence[Tuple[str, str]]]:
303295
"""Pre-rpc interceptor for get_operation
304296
305297
Override in a subclass to manipulate the request or metadata
@@ -308,7 +300,7 @@ def pre_get_operation(
308300
return request, metadata
309301

310302
def post_get_operation(
311-
self, response: operations_pb2.GetOperationRequest
303+
self, response: operations_pb2.Operation
312304
) -> operations_pb2.Operation:
313305
"""Post-rpc interceptor for get_operation
314306
@@ -322,7 +314,7 @@ def pre_list_operations(
322314
self,
323315
request: operations_pb2.ListOperationsRequest,
324316
metadata: Sequence[Tuple[str, str]],
325-
) -> operations_pb2.ListOperationsResponse:
317+
) -> Tuple[operations_pb2.ListOperationsRequest, Sequence[Tuple[str, str]]]:
326318
"""Pre-rpc interceptor for list_operations
327319
328320
Override in a subclass to manipulate the request or metadata
@@ -331,7 +323,7 @@ def pre_list_operations(
331323
return request, metadata
332324

333325
def post_list_operations(
334-
self, response: operations_pb2.ListOperationsRequest
326+
self, response: operations_pb2.ListOperationsResponse
335327
) -> operations_pb2.ListOperationsResponse:
336328
"""Post-rpc interceptor for list_operations
337329
@@ -512,7 +504,7 @@ class _CreateBatch(BatchControllerRestStub):
512504
def __hash__(self):
513505
return hash("CreateBatch")
514506

515-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
507+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
516508

517509
@classmethod
518510
def _get_unset_required_fields(cls, message_dict):
@@ -608,7 +600,7 @@ class _DeleteBatch(BatchControllerRestStub):
608600
def __hash__(self):
609601
return hash("DeleteBatch")
610602

611-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
603+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
612604

613605
@classmethod
614606
def _get_unset_required_fields(cls, message_dict):
@@ -682,7 +674,7 @@ class _GetBatch(BatchControllerRestStub):
682674
def __hash__(self):
683675
return hash("GetBatch")
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):
@@ -772,7 +764,7 @@ class _ListBatches(BatchControllerRestStub):
772764
def __hash__(self):
773765
return hash("ListBatches")
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):

0 commit comments

Comments
 (0)