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

Commit 6861dae

Browse files
fix: resolve DuplicateCredentialArgs error when using credentials_file (#146)
* chore: use gapic-generator-python 0.62.1 * 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 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * lint Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9cd5398 commit 6861dae

File tree

24 files changed

+542
-64
lines changed

24 files changed

+542
-64
lines changed

google/cloud/retail_v2/services/catalog_service/async_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async def list_catalogs(
254254
255255
"""
256256
# Create or coerce a protobuf request object.
257-
# Sanity check: If we got a request object, we should *not* have
257+
# Quick check: If we got a request object, we should *not* have
258258
# gotten any keyword arguments that map to the request.
259259
has_flattened_params = any([parent])
260260
if request is not None and has_flattened_params:
@@ -349,7 +349,7 @@ async def update_catalog(
349349
The catalog configuration.
350350
"""
351351
# Create or coerce a protobuf request object.
352-
# Sanity check: If we got a request object, we should *not* have
352+
# Quick check: If we got a request object, we should *not* have
353353
# gotten any keyword arguments that map to the request.
354354
has_flattened_params = any([catalog, update_mask])
355355
if request is not None and has_flattened_params:
@@ -457,7 +457,7 @@ async def set_default_branch(
457457
sent along with the request as metadata.
458458
"""
459459
# Create or coerce a protobuf request object.
460-
# Sanity check: If we got a request object, we should *not* have
460+
# Quick check: If we got a request object, we should *not* have
461461
# gotten any keyword arguments that map to the request.
462462
has_flattened_params = any([catalog])
463463
if request is not None and has_flattened_params:
@@ -534,7 +534,7 @@ async def get_default_branch(
534534
535535
"""
536536
# Create or coerce a protobuf request object.
537-
# Sanity check: If we got a request object, we should *not* have
537+
# Quick check: If we got a request object, we should *not* have
538538
# gotten any keyword arguments that map to the request.
539539
has_flattened_params = any([catalog])
540540
if request is not None and has_flattened_params:

google/cloud/retail_v2/services/catalog_service/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def list_catalogs(
465465
466466
"""
467467
# Create or coerce a protobuf request object.
468-
# Sanity check: If we got a request object, we should *not* have
468+
# Quick check: If we got a request object, we should *not* have
469469
# gotten any keyword arguments that map to the request.
470470
has_flattened_params = any([parent])
471471
if request is not None and has_flattened_params:
@@ -560,7 +560,7 @@ def update_catalog(
560560
The catalog configuration.
561561
"""
562562
# Create or coerce a protobuf request object.
563-
# Sanity check: If we got a request object, we should *not* have
563+
# Quick check: If we got a request object, we should *not* have
564564
# gotten any keyword arguments that map to the request.
565565
has_flattened_params = any([catalog, update_mask])
566566
if request is not None and has_flattened_params:
@@ -668,7 +668,7 @@ def set_default_branch(
668668
sent along with the request as metadata.
669669
"""
670670
# Create or coerce a protobuf request object.
671-
# Sanity check: If we got a request object, we should *not* have
671+
# Quick check: If we got a request object, we should *not* have
672672
# gotten any keyword arguments that map to the request.
673673
has_flattened_params = any([catalog])
674674
if request is not None and has_flattened_params:
@@ -745,7 +745,7 @@ def get_default_branch(
745745
746746
"""
747747
# Create or coerce a protobuf request object.
748-
# Sanity check: If we got a request object, we should *not* have
748+
# Quick check: If we got a request object, we should *not* have
749749
# gotten any keyword arguments that map to the request.
750750
has_flattened_params = any([catalog])
751751
if request is not None and has_flattened_params:

google/cloud/retail_v2/services/catalog_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ def __init__(
160160
if not self._grpc_channel:
161161
self._grpc_channel = type(self).create_channel(
162162
self._host,
163+
# use the credentials which are saved
163164
credentials=self._credentials,
164-
credentials_file=credentials_file,
165+
# Set ``credentials_file`` to ``None`` here as
166+
# the credentials that we saved earlier should be used.
167+
credentials_file=None,
165168
scopes=self._scopes,
166169
ssl_credentials=self._ssl_channel_credentials,
167170
quota_project_id=quota_project_id,

google/cloud/retail_v2/services/catalog_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ def __init__(
205205
if not self._grpc_channel:
206206
self._grpc_channel = type(self).create_channel(
207207
self._host,
208+
# use the credentials which are saved
208209
credentials=self._credentials,
209-
credentials_file=credentials_file,
210+
# Set ``credentials_file`` to ``None`` here as
211+
# the credentials that we saved earlier should be used.
212+
credentials_file=None,
210213
scopes=self._scopes,
211214
ssl_credentials=self._ssl_channel_credentials,
212215
quota_project_id=quota_project_id,

google/cloud/retail_v2/services/completion_service/transports/grpc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,11 @@ def __init__(
167167
if not self._grpc_channel:
168168
self._grpc_channel = type(self).create_channel(
169169
self._host,
170+
# use the credentials which are saved
170171
credentials=self._credentials,
171-
credentials_file=credentials_file,
172+
# Set ``credentials_file`` to ``None`` here as
173+
# the credentials that we saved earlier should be used.
174+
credentials_file=None,
172175
scopes=self._scopes,
173176
ssl_credentials=self._ssl_channel_credentials,
174177
quota_project_id=quota_project_id,
@@ -241,7 +244,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
241244
This property caches on the instance; repeated calls return the same
242245
client.
243246
"""
244-
# Sanity check: Only create a new client if we do not already have one.
247+
# Quick check: Only create a new client if we do not already have one.
245248
if self._operations_client is None:
246249
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)
247250

google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ def __init__(
212212
if not self._grpc_channel:
213213
self._grpc_channel = type(self).create_channel(
214214
self._host,
215+
# use the credentials which are saved
215216
credentials=self._credentials,
216-
credentials_file=credentials_file,
217+
# Set ``credentials_file`` to ``None`` here as
218+
# the credentials that we saved earlier should be used.
219+
credentials_file=None,
217220
scopes=self._scopes,
218221
ssl_credentials=self._ssl_channel_credentials,
219222
quota_project_id=quota_project_id,
@@ -243,7 +246,7 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
243246
This property caches on the instance; repeated calls return the same
244247
client.
245248
"""
246-
# Sanity check: Only create a new client if we do not already have one.
249+
# Quick check: Only create a new client if we do not already have one.
247250
if self._operations_client is None:
248251
self._operations_client = operations_v1.OperationsAsyncClient(
249252
self.grpc_channel

google/cloud/retail_v2/services/prediction_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,11 @@ def __init__(
158158
if not self._grpc_channel:
159159
self._grpc_channel = type(self).create_channel(
160160
self._host,
161+
# use the credentials which are saved
161162
credentials=self._credentials,
162-
credentials_file=credentials_file,
163+
# Set ``credentials_file`` to ``None`` here as
164+
# the credentials that we saved earlier should be used.
165+
credentials_file=None,
163166
scopes=self._scopes,
164167
ssl_credentials=self._ssl_channel_credentials,
165168
quota_project_id=quota_project_id,

google/cloud/retail_v2/services/prediction_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,11 @@ def __init__(
203203
if not self._grpc_channel:
204204
self._grpc_channel = type(self).create_channel(
205205
self._host,
206+
# use the credentials which are saved
206207
credentials=self._credentials,
207-
credentials_file=credentials_file,
208+
# Set ``credentials_file`` to ``None`` here as
209+
# the credentials that we saved earlier should be used.
210+
credentials_file=None,
208211
scopes=self._scopes,
209212
ssl_credentials=self._ssl_channel_credentials,
210213
quota_project_id=quota_project_id,

google/cloud/retail_v2/services/product_service/async_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def create_product(
284284
285285
"""
286286
# Create or coerce a protobuf request object.
287-
# Sanity check: If we got a request object, we should *not* have
287+
# Quick check: If we got a request object, we should *not* have
288288
# gotten any keyword arguments that map to the request.
289289
has_flattened_params = any([parent, product, product_id])
290290
if request is not None and has_flattened_params:
@@ -370,7 +370,7 @@ async def get_product(
370370
371371
"""
372372
# Create or coerce a protobuf request object.
373-
# Sanity check: If we got a request object, we should *not* have
373+
# Quick check: If we got a request object, we should *not* have
374374
# gotten any keyword arguments that map to the request.
375375
has_flattened_params = any([name])
376376
if request is not None and has_flattened_params:
@@ -453,7 +453,7 @@ async def list_products(
453453
454454
"""
455455
# Create or coerce a protobuf request object.
456-
# Sanity check: If we got a request object, we should *not* have
456+
# Quick check: If we got a request object, we should *not* have
457457
# gotten any keyword arguments that map to the request.
458458
has_flattened_params = any([parent])
459459
if request is not None and has_flattened_params:
@@ -554,7 +554,7 @@ async def update_product(
554554
555555
"""
556556
# Create or coerce a protobuf request object.
557-
# Sanity check: If we got a request object, we should *not* have
557+
# Quick check: If we got a request object, we should *not* have
558558
# gotten any keyword arguments that map to the request.
559559
has_flattened_params = any([product, update_mask])
560560
if request is not None and has_flattened_params:
@@ -646,7 +646,7 @@ async def delete_product(
646646
sent along with the request as metadata.
647647
"""
648648
# Create or coerce a protobuf request object.
649-
# Sanity check: If we got a request object, we should *not* have
649+
# Quick check: If we got a request object, we should *not* have
650650
# gotten any keyword arguments that map to the request.
651651
has_flattened_params = any([name])
652652
if request is not None and has_flattened_params:
@@ -898,7 +898,7 @@ async def set_inventory(
898898
899899
"""
900900
# Create or coerce a protobuf request object.
901-
# Sanity check: If we got a request object, we should *not* have
901+
# Quick check: If we got a request object, we should *not* have
902902
# gotten any keyword arguments that map to the request.
903903
has_flattened_params = any([inventory, set_mask])
904904
if request is not None and has_flattened_params:
@@ -1007,7 +1007,7 @@ async def add_fulfillment_places(
10071007
10081008
"""
10091009
# Create or coerce a protobuf request object.
1010-
# Sanity check: If we got a request object, we should *not* have
1010+
# Quick check: If we got a request object, we should *not* have
10111011
# gotten any keyword arguments that map to the request.
10121012
has_flattened_params = any([product])
10131013
if request is not None and has_flattened_params:
@@ -1112,7 +1112,7 @@ async def remove_fulfillment_places(
11121112
11131113
"""
11141114
# Create or coerce a protobuf request object.
1115-
# Sanity check: If we got a request object, we should *not* have
1115+
# Quick check: If we got a request object, we should *not* have
11161116
# gotten any keyword arguments that map to the request.
11171117
has_flattened_params = any([product])
11181118
if request is not None and has_flattened_params:

google/cloud/retail_v2/services/product_service/client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def create_product(
501501
502502
"""
503503
# Create or coerce a protobuf request object.
504-
# Sanity check: If we got a request object, we should *not* have
504+
# Quick check: If we got a request object, we should *not* have
505505
# gotten any keyword arguments that map to the request.
506506
has_flattened_params = any([parent, product, product_id])
507507
if request is not None and has_flattened_params:
@@ -587,7 +587,7 @@ def get_product(
587587
588588
"""
589589
# Create or coerce a protobuf request object.
590-
# Sanity check: If we got a request object, we should *not* have
590+
# Quick check: If we got a request object, we should *not* have
591591
# gotten any keyword arguments that map to the request.
592592
has_flattened_params = any([name])
593593
if request is not None and has_flattened_params:
@@ -670,7 +670,7 @@ def list_products(
670670
671671
"""
672672
# Create or coerce a protobuf request object.
673-
# Sanity check: If we got a request object, we should *not* have
673+
# Quick check: If we got a request object, we should *not* have
674674
# gotten any keyword arguments that map to the request.
675675
has_flattened_params = any([parent])
676676
if request is not None and has_flattened_params:
@@ -771,7 +771,7 @@ def update_product(
771771
772772
"""
773773
# Create or coerce a protobuf request object.
774-
# Sanity check: If we got a request object, we should *not* have
774+
# Quick check: If we got a request object, we should *not* have
775775
# gotten any keyword arguments that map to the request.
776776
has_flattened_params = any([product, update_mask])
777777
if request is not None and has_flattened_params:
@@ -863,7 +863,7 @@ def delete_product(
863863
sent along with the request as metadata.
864864
"""
865865
# Create or coerce a protobuf request object.
866-
# Sanity check: If we got a request object, we should *not* have
866+
# Quick check: If we got a request object, we should *not* have
867867
# gotten any keyword arguments that map to the request.
868868
has_flattened_params = any([name])
869869
if request is not None and has_flattened_params:
@@ -1106,7 +1106,7 @@ def set_inventory(
11061106
11071107
"""
11081108
# Create or coerce a protobuf request object.
1109-
# Sanity check: If we got a request object, we should *not* have
1109+
# Quick check: If we got a request object, we should *not* have
11101110
# gotten any keyword arguments that map to the request.
11111111
has_flattened_params = any([inventory, set_mask])
11121112
if request is not None and has_flattened_params:
@@ -1215,7 +1215,7 @@ def add_fulfillment_places(
12151215
12161216
"""
12171217
# Create or coerce a protobuf request object.
1218-
# Sanity check: If we got a request object, we should *not* have
1218+
# Quick check: If we got a request object, we should *not* have
12191219
# gotten any keyword arguments that map to the request.
12201220
has_flattened_params = any([product])
12211221
if request is not None and has_flattened_params:
@@ -1320,7 +1320,7 @@ def remove_fulfillment_places(
13201320
13211321
"""
13221322
# Create or coerce a protobuf request object.
1323-
# Sanity check: If we got a request object, we should *not* have
1323+
# Quick check: If we got a request object, we should *not* have
13241324
# gotten any keyword arguments that map to the request.
13251325
has_flattened_params = any([product])
13261326
if request is not None and has_flattened_params:

0 commit comments

Comments
 (0)