Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.62.1 (#529)
Browse files Browse the repository at this point in the history
- [ ] 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: googleapis/googleapis-gen@4fb761b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGZiNzYxYmJkODUwNmFjMTU2ZjQ5YmFjNWYxODMwNmFhOGViM2FhOCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Feb 3, 2022
1 parent 31c943e commit 77b9082
Show file tree
Hide file tree
Showing 12 changed files with 242 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async def create_index(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, index])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -385,7 +385,7 @@ async def list_indexes(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -474,7 +474,7 @@ async def get_index(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -550,7 +550,7 @@ async def delete_index(
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -634,7 +634,7 @@ async def get_field(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -736,7 +736,7 @@ async def update_field(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([field])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -828,7 +828,7 @@ async def list_fields(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -903,8 +903,7 @@ async def export_documents(
For more details on export behavior and output format,
refer to:
https://cloud.google.com/firestore/docs/manage-
data/export-import
https://cloud.google.com/firestore/docs/manage-data/export-import
Args:
request (Union[google.cloud.firestore_admin_v1.types.ExportDocumentsRequest, dict]):
Expand Down Expand Up @@ -935,7 +934,7 @@ async def export_documents(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1033,7 +1032,7 @@ async def import_documents(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1114,7 +1113,7 @@ async def get_database(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1183,7 +1182,7 @@ async def list_databases(
The list of databases for a project.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1262,7 +1261,7 @@ async def update_database(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([database, update_mask])
if request is not None and has_flattened_params:
Expand Down
27 changes: 13 additions & 14 deletions google/cloud/firestore_admin_v1/services/firestore_admin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def create_index(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, index])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -619,7 +619,7 @@ def list_indexes(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -697,7 +697,7 @@ def get_index(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -762,7 +762,7 @@ def delete_index(
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -835,7 +835,7 @@ def get_field(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -926,7 +926,7 @@ def update_field(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([field])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1018,7 +1018,7 @@ def list_fields(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1082,8 +1082,7 @@ def export_documents(
For more details on export behavior and output format,
refer to:
https://cloud.google.com/firestore/docs/manage-
data/export-import
https://cloud.google.com/firestore/docs/manage-data/export-import
Args:
request (Union[google.cloud.firestore_admin_v1.types.ExportDocumentsRequest, dict]):
Expand Down Expand Up @@ -1114,7 +1113,7 @@ def export_documents(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1212,7 +1211,7 @@ def import_documents(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1293,7 +1292,7 @@ def get_database(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1362,7 +1361,7 @@ def list_databases(
The list of databases for a project.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1441,7 +1440,7 @@ def update_database(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([database, update_mask])
if request is not None and has_flattened_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,11 @@ def __init__(
if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
self._host,
# use the credentials which are saved
credentials=self._credentials,
credentials_file=credentials_file,
# Set ``credentials_file`` to ``None`` here as
# the credentials that we saved earlier should be used.
credentials_file=None,
scopes=self._scopes,
ssl_credentials=self._ssl_channel_credentials,
quota_project_id=quota_project_id,
Expand Down Expand Up @@ -269,7 +272,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
This property caches on the instance; repeated calls return the same
client.
"""
# Sanity check: Only create a new client if we do not already have one.
# Quick check: Only create a new client if we do not already have one.
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

Expand Down Expand Up @@ -504,8 +507,7 @@ def export_documents(
For more details on export behavior and output format,
refer to:
https://cloud.google.com/firestore/docs/manage-
data/export-import
https://cloud.google.com/firestore/docs/manage-data/export-import
Returns:
Callable[[~.ExportDocumentsRequest],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@ def __init__(
if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
self._host,
# use the credentials which are saved
credentials=self._credentials,
credentials_file=credentials_file,
# Set ``credentials_file`` to ``None`` here as
# the credentials that we saved earlier should be used.
credentials_file=None,
scopes=self._scopes,
ssl_credentials=self._ssl_channel_credentials,
quota_project_id=quota_project_id,
Expand Down Expand Up @@ -271,7 +274,7 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
This property caches on the instance; repeated calls return the same
client.
"""
# Sanity check: Only create a new client if we do not already have one.
# Quick check: Only create a new client if we do not already have one.
if self._operations_client is None:
self._operations_client = operations_v1.OperationsAsyncClient(
self.grpc_channel
Expand Down Expand Up @@ -520,8 +523,7 @@ def export_documents(
For more details on export behavior and output format,
refer to:
https://cloud.google.com/firestore/docs/manage-
data/export-import
https://cloud.google.com/firestore/docs/manage-data/export-import
Returns:
Callable[[~.ExportDocumentsRequest],
Expand Down
10 changes: 5 additions & 5 deletions google/cloud/firestore_admin_v1/types/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ class Database(proto.Message):
type_ (google.cloud.firestore_admin_v1.types.Database.DatabaseType):
The type of the database.
See
https://cloud.google.com/datastore/docs/firestore-
or-datastore for information about how to
choose.
https://cloud.google.com/datastore/docs/firestore-or-datastore
for information about how to choose.
concurrency_mode (google.cloud.firestore_admin_v1.types.Database.ConcurrencyMode):
The concurrency control mode to use for this
database.
Expand All @@ -52,8 +51,9 @@ class Database(proto.Message):

class DatabaseType(proto.Enum):
r"""The type of the database.
See https://cloud.google.com/datastore/docs/firestore-or-
datastore for information about how to choose.
See
https://cloud.google.com/datastore/docs/firestore-or-datastore
for information about how to choose.
"""
DATABASE_TYPE_UNSPECIFIED = 0
FIRESTORE_NATIVE = 1
Expand Down
26 changes: 13 additions & 13 deletions google/cloud/firestore_v1/services/firestore/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@

class FirestoreAsyncClient:
"""The Cloud Firestore service.
Cloud Firestore is a fast, fully managed, serverless, cloud-
native NoSQL document database that simplifies storing, syncing,
and querying data for your mobile, web, and IoT apps at global
scale. Its client libraries provide live synchronization and
offline support, while its security features and integrations
with Firebase and Google Cloud Platform (GCP) accelerate
building truly serverless apps.
Cloud Firestore is a fast, fully managed, serverless,
cloud-native NoSQL document database that simplifies storing,
syncing, and querying data for your mobile, web, and IoT apps at
global scale. Its client libraries provide live synchronization
and offline support, while its security features and
integrations with Firebase and Google Cloud Platform (GCP)
accelerate building truly serverless apps.
"""

_client: FirestoreClient
Expand Down Expand Up @@ -401,7 +401,7 @@ async def update_document(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([document, update_mask])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -481,7 +481,7 @@ async def delete_document(
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -626,7 +626,7 @@ async def begin_transaction(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([database])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -718,7 +718,7 @@ async def commit(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([database, writes])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -803,7 +803,7 @@ async def rollback(
sent along with the request as metadata.
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([database, transaction])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1140,7 +1140,7 @@ async def list_collection_ids(
"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down
Loading

0 comments on commit 77b9082

Please sign in to comment.