Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 776dbea

Browse files
chore: use gapic-generator-python 0.62.1 (#77)
- [ ] Regenerate this pull request now. fix: resolve DuplicateCredentialArgs error when using credentials_file committer: parthea PiperOrigin-RevId: 425964861 Source-Link: googleapis/googleapis@84b1a5a Source-Link: https://github.com/googleapis/googleapis-gen/commit/4fb761bbd8506ac156f49bac5f18306aa8eb3aa8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGZiNzYxYmJkODUwNmFjMTU2ZjQ5YmFjNWYxODMwNmFhOGViM2FhOCJ9
1 parent c6b1bfa commit 776dbea

11 files changed

Lines changed: 200 additions & 52 deletions

File tree

google/cloud/tpu_v1/services/tpu/async_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ async def list_nodes(
239239
240240
"""
241241
# Create or coerce a protobuf request object.
242-
# Sanity check: If we got a request object, we should *not* have
242+
# Quick check: If we got a request object, we should *not* have
243243
# gotten any keyword arguments that map to the request.
244244
has_flattened_params = any([parent])
245245
if request is not None and has_flattened_params:
@@ -312,7 +312,7 @@ async def get_node(
312312
A TPU instance.
313313
"""
314314
# Create or coerce a protobuf request object.
315-
# Sanity check: If we got a request object, we should *not* have
315+
# Quick check: If we got a request object, we should *not* have
316316
# gotten any keyword arguments that map to the request.
317317
has_flattened_params = any([name])
318318
if request is not None and has_flattened_params:
@@ -395,7 +395,7 @@ async def create_node(
395395
396396
"""
397397
# Create or coerce a protobuf request object.
398-
# Sanity check: If we got a request object, we should *not* have
398+
# Quick check: If we got a request object, we should *not* have
399399
# gotten any keyword arguments that map to the request.
400400
has_flattened_params = any([parent, node, node_id])
401401
if request is not None and has_flattened_params:
@@ -478,7 +478,7 @@ async def delete_node(
478478
479479
"""
480480
# Create or coerce a protobuf request object.
481-
# Sanity check: If we got a request object, we should *not* have
481+
# Quick check: If we got a request object, we should *not* have
482482
# gotten any keyword arguments that map to the request.
483483
has_flattened_params = any([name])
484484
if request is not None and has_flattened_params:
@@ -735,7 +735,7 @@ async def list_tensor_flow_versions(
735735
736736
"""
737737
# Create or coerce a protobuf request object.
738-
# Sanity check: If we got a request object, we should *not* have
738+
# Quick check: If we got a request object, we should *not* have
739739
# gotten any keyword arguments that map to the request.
740740
has_flattened_params = any([parent])
741741
if request is not None and has_flattened_params:
@@ -810,7 +810,7 @@ async def get_tensor_flow_version(
810810
811811
"""
812812
# Create or coerce a protobuf request object.
813-
# Sanity check: If we got a request object, we should *not* have
813+
# Quick check: If we got a request object, we should *not* have
814814
# gotten any keyword arguments that map to the request.
815815
has_flattened_params = any([name])
816816
if request is not None and has_flattened_params:
@@ -882,7 +882,7 @@ async def list_accelerator_types(
882882
883883
"""
884884
# Create or coerce a protobuf request object.
885-
# Sanity check: If we got a request object, we should *not* have
885+
# Quick check: If we got a request object, we should *not* have
886886
# gotten any keyword arguments that map to the request.
887887
has_flattened_params = any([parent])
888888
if request is not None and has_flattened_params:
@@ -957,7 +957,7 @@ async def get_accelerator_type(
957957
958958
"""
959959
# Create or coerce a protobuf request object.
960-
# Sanity check: If we got a request object, we should *not* have
960+
# Quick check: If we got a request object, we should *not* have
961961
# gotten any keyword arguments that map to the request.
962962
has_flattened_params = any([name])
963963
if request is not None and has_flattened_params:

google/cloud/tpu_v1/services/tpu/client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def list_nodes(
474474
475475
"""
476476
# Create or coerce a protobuf request object.
477-
# Sanity check: If we got a request object, we should *not* have
477+
# Quick check: If we got a request object, we should *not* have
478478
# gotten any keyword arguments that map to the request.
479479
has_flattened_params = any([parent])
480480
if request is not None and has_flattened_params:
@@ -547,7 +547,7 @@ def get_node(
547547
A TPU instance.
548548
"""
549549
# Create or coerce a protobuf request object.
550-
# Sanity check: If we got a request object, we should *not* have
550+
# Quick check: If we got a request object, we should *not* have
551551
# gotten any keyword arguments that map to the request.
552552
has_flattened_params = any([name])
553553
if request is not None and has_flattened_params:
@@ -630,7 +630,7 @@ def create_node(
630630
631631
"""
632632
# Create or coerce a protobuf request object.
633-
# Sanity check: If we got a request object, we should *not* have
633+
# Quick check: If we got a request object, we should *not* have
634634
# gotten any keyword arguments that map to the request.
635635
has_flattened_params = any([parent, node, node_id])
636636
if request is not None and has_flattened_params:
@@ -713,7 +713,7 @@ def delete_node(
713713
714714
"""
715715
# Create or coerce a protobuf request object.
716-
# Sanity check: If we got a request object, we should *not* have
716+
# Quick check: If we got a request object, we should *not* have
717717
# gotten any keyword arguments that map to the request.
718718
has_flattened_params = any([name])
719719
if request is not None and has_flattened_params:
@@ -973,7 +973,7 @@ def list_tensor_flow_versions(
973973
974974
"""
975975
# Create or coerce a protobuf request object.
976-
# Sanity check: If we got a request object, we should *not* have
976+
# Quick check: If we got a request object, we should *not* have
977977
# gotten any keyword arguments that map to the request.
978978
has_flattened_params = any([parent])
979979
if request is not None and has_flattened_params:
@@ -1050,7 +1050,7 @@ def get_tensor_flow_version(
10501050
10511051
"""
10521052
# Create or coerce a protobuf request object.
1053-
# Sanity check: If we got a request object, we should *not* have
1053+
# Quick check: If we got a request object, we should *not* have
10541054
# gotten any keyword arguments that map to the request.
10551055
has_flattened_params = any([name])
10561056
if request is not None and has_flattened_params:
@@ -1122,7 +1122,7 @@ def list_accelerator_types(
11221122
11231123
"""
11241124
# Create or coerce a protobuf request object.
1125-
# Sanity check: If we got a request object, we should *not* have
1125+
# Quick check: If we got a request object, we should *not* have
11261126
# gotten any keyword arguments that map to the request.
11271127
has_flattened_params = any([parent])
11281128
if request is not None and has_flattened_params:
@@ -1197,7 +1197,7 @@ def get_accelerator_type(
11971197
11981198
"""
11991199
# Create or coerce a protobuf request object.
1200-
# Sanity check: If we got a request object, we should *not* have
1200+
# Quick check: If we got a request object, we should *not* have
12011201
# gotten any keyword arguments that map to the request.
12021202
has_flattened_params = any([name])
12031203
if request is not None and has_flattened_params:

google/cloud/tpu_v1/services/tpu/transports/grpc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ def __init__(
162162
if not self._grpc_channel:
163163
self._grpc_channel = type(self).create_channel(
164164
self._host,
165+
# use the credentials which are saved
165166
credentials=self._credentials,
166-
credentials_file=credentials_file,
167+
# Set ``credentials_file`` to ``None`` here as
168+
# the credentials that we saved earlier should be used.
169+
credentials_file=None,
167170
scopes=self._scopes,
168171
ssl_credentials=self._ssl_channel_credentials,
169172
quota_project_id=quota_project_id,
@@ -236,7 +239,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
236239
This property caches on the instance; repeated calls return the same
237240
client.
238241
"""
239-
# Sanity check: Only create a new client if we do not already have one.
242+
# Quick check: Only create a new client if we do not already have one.
240243
if self._operations_client is None:
241244
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)
242245

google/cloud/tpu_v1/services/tpu/transports/grpc_asyncio.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,11 @@ def __init__(
207207
if not self._grpc_channel:
208208
self._grpc_channel = type(self).create_channel(
209209
self._host,
210+
# use the credentials which are saved
210211
credentials=self._credentials,
211-
credentials_file=credentials_file,
212+
# Set ``credentials_file`` to ``None`` here as
213+
# the credentials that we saved earlier should be used.
214+
credentials_file=None,
212215
scopes=self._scopes,
213216
ssl_credentials=self._ssl_channel_credentials,
214217
quota_project_id=quota_project_id,
@@ -238,7 +241,7 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
238241
This property caches on the instance; repeated calls return the same
239242
client.
240243
"""
241-
# Sanity check: Only create a new client if we do not already have one.
244+
# Quick check: Only create a new client if we do not already have one.
242245
if self._operations_client is None:
243246
self._operations_client = operations_v1.OperationsAsyncClient(
244247
self.grpc_channel

google/cloud/tpu_v2alpha1/services/tpu/async_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async def list_nodes(
238238
239239
"""
240240
# Create or coerce a protobuf request object.
241-
# Sanity check: If we got a request object, we should *not* have
241+
# Quick check: If we got a request object, we should *not* have
242242
# gotten any keyword arguments that map to the request.
243243
has_flattened_params = any([parent])
244244
if request is not None and has_flattened_params:
@@ -311,7 +311,7 @@ async def get_node(
311311
A TPU instance.
312312
"""
313313
# Create or coerce a protobuf request object.
314-
# Sanity check: If we got a request object, we should *not* have
314+
# Quick check: If we got a request object, we should *not* have
315315
# gotten any keyword arguments that map to the request.
316316
has_flattened_params = any([name])
317317
if request is not None and has_flattened_params:
@@ -395,7 +395,7 @@ async def create_node(
395395
396396
"""
397397
# Create or coerce a protobuf request object.
398-
# Sanity check: If we got a request object, we should *not* have
398+
# Quick check: If we got a request object, we should *not* have
399399
# gotten any keyword arguments that map to the request.
400400
has_flattened_params = any([parent, node, node_id])
401401
if request is not None and has_flattened_params:
@@ -479,7 +479,7 @@ async def delete_node(
479479
480480
"""
481481
# Create or coerce a protobuf request object.
482-
# Sanity check: If we got a request object, we should *not* have
482+
# Quick check: If we got a request object, we should *not* have
483483
# gotten any keyword arguments that map to the request.
484484
has_flattened_params = any([name])
485485
if request is not None and has_flattened_params:
@@ -690,7 +690,7 @@ async def update_node(
690690
691691
"""
692692
# Create or coerce a protobuf request object.
693-
# Sanity check: If we got a request object, we should *not* have
693+
# Quick check: If we got a request object, we should *not* have
694694
# gotten any keyword arguments that map to the request.
695695
has_flattened_params = any([node, update_mask])
696696
if request is not None and has_flattened_params:
@@ -824,7 +824,7 @@ async def list_accelerator_types(
824824
825825
"""
826826
# Create or coerce a protobuf request object.
827-
# Sanity check: If we got a request object, we should *not* have
827+
# Quick check: If we got a request object, we should *not* have
828828
# gotten any keyword arguments that map to the request.
829829
has_flattened_params = any([parent])
830830
if request is not None and has_flattened_params:
@@ -899,7 +899,7 @@ async def get_accelerator_type(
899899
900900
"""
901901
# Create or coerce a protobuf request object.
902-
# Sanity check: If we got a request object, we should *not* have
902+
# Quick check: If we got a request object, we should *not* have
903903
# gotten any keyword arguments that map to the request.
904904
has_flattened_params = any([name])
905905
if request is not None and has_flattened_params:
@@ -971,7 +971,7 @@ async def list_runtime_versions(
971971
972972
"""
973973
# Create or coerce a protobuf request object.
974-
# Sanity check: If we got a request object, we should *not* have
974+
# Quick check: If we got a request object, we should *not* have
975975
# gotten any keyword arguments that map to the request.
976976
has_flattened_params = any([parent])
977977
if request is not None and has_flattened_params:
@@ -1046,7 +1046,7 @@ async def get_runtime_version(
10461046
10471047
"""
10481048
# Create or coerce a protobuf request object.
1049-
# Sanity check: If we got a request object, we should *not* have
1049+
# Quick check: If we got a request object, we should *not* have
10501050
# gotten any keyword arguments that map to the request.
10511051
has_flattened_params = any([name])
10521052
if request is not None and has_flattened_params:

google/cloud/tpu_v2alpha1/services/tpu/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def list_nodes(
473473
474474
"""
475475
# Create or coerce a protobuf request object.
476-
# Sanity check: If we got a request object, we should *not* have
476+
# Quick check: If we got a request object, we should *not* have
477477
# gotten any keyword arguments that map to the request.
478478
has_flattened_params = any([parent])
479479
if request is not None and has_flattened_params:
@@ -546,7 +546,7 @@ def get_node(
546546
A TPU instance.
547547
"""
548548
# Create or coerce a protobuf request object.
549-
# Sanity check: If we got a request object, we should *not* have
549+
# Quick check: If we got a request object, we should *not* have
550550
# gotten any keyword arguments that map to the request.
551551
has_flattened_params = any([name])
552552
if request is not None and has_flattened_params:
@@ -630,7 +630,7 @@ def create_node(
630630
631631
"""
632632
# Create or coerce a protobuf request object.
633-
# Sanity check: If we got a request object, we should *not* have
633+
# Quick check: If we got a request object, we should *not* have
634634
# gotten any keyword arguments that map to the request.
635635
has_flattened_params = any([parent, node, node_id])
636636
if request is not None and has_flattened_params:
@@ -714,7 +714,7 @@ def delete_node(
714714
715715
"""
716716
# Create or coerce a protobuf request object.
717-
# Sanity check: If we got a request object, we should *not* have
717+
# Quick check: If we got a request object, we should *not* have
718718
# gotten any keyword arguments that map to the request.
719719
has_flattened_params = any([name])
720720
if request is not None and has_flattened_params:
@@ -927,7 +927,7 @@ def update_node(
927927
928928
"""
929929
# Create or coerce a protobuf request object.
930-
# Sanity check: If we got a request object, we should *not* have
930+
# Quick check: If we got a request object, we should *not* have
931931
# gotten any keyword arguments that map to the request.
932932
has_flattened_params = any([node, update_mask])
933933
if request is not None and has_flattened_params:
@@ -1064,7 +1064,7 @@ def list_accelerator_types(
10641064
10651065
"""
10661066
# Create or coerce a protobuf request object.
1067-
# Sanity check: If we got a request object, we should *not* have
1067+
# Quick check: If we got a request object, we should *not* have
10681068
# gotten any keyword arguments that map to the request.
10691069
has_flattened_params = any([parent])
10701070
if request is not None and has_flattened_params:
@@ -1139,7 +1139,7 @@ def get_accelerator_type(
11391139
11401140
"""
11411141
# Create or coerce a protobuf request object.
1142-
# Sanity check: If we got a request object, we should *not* have
1142+
# Quick check: If we got a request object, we should *not* have
11431143
# gotten any keyword arguments that map to the request.
11441144
has_flattened_params = any([name])
11451145
if request is not None and has_flattened_params:
@@ -1211,7 +1211,7 @@ def list_runtime_versions(
12111211
12121212
"""
12131213
# Create or coerce a protobuf request object.
1214-
# Sanity check: If we got a request object, we should *not* have
1214+
# Quick check: If we got a request object, we should *not* have
12151215
# gotten any keyword arguments that map to the request.
12161216
has_flattened_params = any([parent])
12171217
if request is not None and has_flattened_params:
@@ -1286,7 +1286,7 @@ def get_runtime_version(
12861286
12871287
"""
12881288
# Create or coerce a protobuf request object.
1289-
# Sanity check: If we got a request object, we should *not* have
1289+
# Quick check: If we got a request object, we should *not* have
12901290
# gotten any keyword arguments that map to the request.
12911291
has_flattened_params = any([name])
12921292
if request is not None and has_flattened_params:

google/cloud/tpu_v2alpha1/services/tpu/transports/grpc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ def __init__(
162162
if not self._grpc_channel:
163163
self._grpc_channel = type(self).create_channel(
164164
self._host,
165+
# use the credentials which are saved
165166
credentials=self._credentials,
166-
credentials_file=credentials_file,
167+
# Set ``credentials_file`` to ``None`` here as
168+
# the credentials that we saved earlier should be used.
169+
credentials_file=None,
167170
scopes=self._scopes,
168171
ssl_credentials=self._ssl_channel_credentials,
169172
quota_project_id=quota_project_id,
@@ -236,7 +239,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
236239
This property caches on the instance; repeated calls return the same
237240
client.
238241
"""
239-
# Sanity check: Only create a new client if we do not already have one.
242+
# Quick check: Only create a new client if we do not already have one.
240243
if self._operations_client is None:
241244
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)
242245

google/cloud/tpu_v2alpha1/services/tpu/transports/grpc_asyncio.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,11 @@ def __init__(
207207
if not self._grpc_channel:
208208
self._grpc_channel = type(self).create_channel(
209209
self._host,
210+
# use the credentials which are saved
210211
credentials=self._credentials,
211-
credentials_file=credentials_file,
212+
# Set ``credentials_file`` to ``None`` here as
213+
# the credentials that we saved earlier should be used.
214+
credentials_file=None,
212215
scopes=self._scopes,
213216
ssl_credentials=self._ssl_channel_credentials,
214217
quota_project_id=quota_project_id,
@@ -238,7 +241,7 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
238241
This property caches on the instance; repeated calls return the same
239242
client.
240243
"""
241-
# Sanity check: Only create a new client if we do not already have one.
244+
# Quick check: Only create a new client if we do not already have one.
242245
if self._operations_client is None:
243246
self._operations_client = operations_v1.OperationsAsyncClient(
244247
self.grpc_channel

0 commit comments

Comments
 (0)