From 32bc18080346d21dc1e0a4a7142707f6888c5359 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:22:13 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#457) - [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: https://github.com/googleapis/googleapis/commit/b224dfa52642a733ea64849d4e06d15c274bc08f Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9 --- .../services/firestore_admin/client.py | 38 +++++------ .../firestore_admin/transports/base.py | 2 +- .../firestore_admin/transports/grpc.py | 6 +- .../transports/grpc_asyncio.py | 6 +- .../firestore_v1/services/firestore/client.py | 64 ++++++++----------- .../services/firestore/transports/base.py | 2 +- .../services/firestore/transports/grpc.py | 6 +- .../firestore/transports/grpc_asyncio.py | 6 +- scripts/fixup_firestore_admin_v1_keywords.py | 20 +++--- scripts/fixup_firestore_v1_keywords.py | 32 +++++----- 10 files changed, 86 insertions(+), 96 deletions(-) diff --git a/google/cloud/firestore_admin_v1/services/firestore_admin/client.py b/google/cloud/firestore_admin_v1/services/firestore_admin/client.py index 7f34c8e30..b7bfb7e78 100644 --- a/google/cloud/firestore_admin_v1/services/firestore_admin/client.py +++ b/google/cloud/firestore_admin_v1/services/firestore_admin/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -407,7 +407,7 @@ def __init__( def create_index( self, - request: firestore_admin.CreateIndexRequest = None, + request: Union[firestore_admin.CreateIndexRequest, dict] = None, *, parent: str = None, index: gfa_index.Index = None, @@ -422,7 +422,7 @@ def create_index( [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. Args: - request (google.cloud.firestore_admin_v1.types.CreateIndexRequest): + request (Union[google.cloud.firestore_admin_v1.types.CreateIndexRequest, dict]): The request object. The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex]. parent (str): @@ -502,7 +502,7 @@ def create_index( def list_indexes( self, - request: firestore_admin.ListIndexesRequest = None, + request: Union[firestore_admin.ListIndexesRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -512,7 +512,7 @@ def list_indexes( r"""Lists composite indexes. Args: - request (google.cloud.firestore_admin_v1.types.ListIndexesRequest): + request (Union[google.cloud.firestore_admin_v1.types.ListIndexesRequest, dict]): The request object. The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes]. parent (str): @@ -582,7 +582,7 @@ def list_indexes( def get_index( self, - request: firestore_admin.GetIndexRequest = None, + request: Union[firestore_admin.GetIndexRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -592,7 +592,7 @@ def get_index( r"""Gets a composite index. Args: - request (google.cloud.firestore_admin_v1.types.GetIndexRequest): + request (Union[google.cloud.firestore_admin_v1.types.GetIndexRequest, dict]): The request object. The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex]. name (str): @@ -654,7 +654,7 @@ def get_index( def delete_index( self, - request: firestore_admin.DeleteIndexRequest = None, + request: Union[firestore_admin.DeleteIndexRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -664,7 +664,7 @@ def delete_index( r"""Deletes a composite index. Args: - request (google.cloud.firestore_admin_v1.types.DeleteIndexRequest): + request (Union[google.cloud.firestore_admin_v1.types.DeleteIndexRequest, dict]): The request object. The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. name (str): @@ -718,7 +718,7 @@ def delete_index( def get_field( self, - request: firestore_admin.GetFieldRequest = None, + request: Union[firestore_admin.GetFieldRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -728,7 +728,7 @@ def get_field( r"""Gets the metadata and configuration for a Field. Args: - request (google.cloud.firestore_admin_v1.types.GetFieldRequest): + request (Union[google.cloud.firestore_admin_v1.types.GetFieldRequest, dict]): The request object. The request for [FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField]. name (str): @@ -792,7 +792,7 @@ def get_field( def update_field( self, - request: firestore_admin.UpdateFieldRequest = None, + request: Union[firestore_admin.UpdateFieldRequest, dict] = None, *, field: gfa_field.Field = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -817,7 +817,7 @@ def update_field( ``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``. Args: - request (google.cloud.firestore_admin_v1.types.UpdateFieldRequest): + request (Union[google.cloud.firestore_admin_v1.types.UpdateFieldRequest, dict]): The request object. The request for [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField]. field (google.cloud.firestore_admin_v1.types.Field): @@ -893,7 +893,7 @@ def update_field( def list_fields( self, - request: firestore_admin.ListFieldsRequest = None, + request: Union[firestore_admin.ListFieldsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -910,7 +910,7 @@ def list_fields( with the filter set to ``indexConfig.usesAncestorConfig:false``. Args: - request (google.cloud.firestore_admin_v1.types.ListFieldsRequest): + request (Union[google.cloud.firestore_admin_v1.types.ListFieldsRequest, dict]): The request object. The request for [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]. parent (str): @@ -980,7 +980,7 @@ def list_fields( def export_documents( self, - request: firestore_admin.ExportDocumentsRequest = None, + request: Union[firestore_admin.ExportDocumentsRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -999,7 +999,7 @@ def export_documents( Google Cloud Storage. Args: - request (google.cloud.firestore_admin_v1.types.ExportDocumentsRequest): + request (Union[google.cloud.firestore_admin_v1.types.ExportDocumentsRequest, dict]): The request object. The request for [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. name (str): @@ -1073,7 +1073,7 @@ def export_documents( def import_documents( self, - request: firestore_admin.ImportDocumentsRequest = None, + request: Union[firestore_admin.ImportDocumentsRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1089,7 +1089,7 @@ def import_documents( already been imported to Cloud Firestore. Args: - request (google.cloud.firestore_admin_v1.types.ImportDocumentsRequest): + request (Union[google.cloud.firestore_admin_v1.types.ImportDocumentsRequest, dict]): The request object. The request for [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. name (str): diff --git a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py index fb8eca528..64a79572c 100644 --- a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py +++ b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py @@ -125,7 +125,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py index f2474db75..e06ff97fc 100644 --- a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py +++ b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py @@ -86,16 +86,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py index a3ef9cf38..77684765c 100644 --- a/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py +++ b/google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py @@ -133,16 +133,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/firestore_v1/services/firestore/client.py b/google/cloud/firestore_v1/services/firestore/client.py index 1a74fc874..ec048236f 100644 --- a/google/cloud/firestore_v1/services/firestore/client.py +++ b/google/cloud/firestore_v1/services/firestore/client.py @@ -17,17 +17,7 @@ from distutils import util import os import re -from typing import ( - Callable, - Dict, - Optional, - Iterable, - Iterator, - Sequence, - Tuple, - Type, - Union, -) +from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -359,7 +349,7 @@ def __init__( def get_document( self, - request: firestore.GetDocumentRequest = None, + request: Union[firestore.GetDocumentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -368,7 +358,7 @@ def get_document( r"""Gets a single document. Args: - request (google.cloud.firestore_v1.types.GetDocumentRequest): + request (Union[google.cloud.firestore_v1.types.GetDocumentRequest, dict]): The request object. The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -409,7 +399,7 @@ def get_document( def list_documents( self, - request: firestore.ListDocumentsRequest = None, + request: Union[firestore.ListDocumentsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -418,7 +408,7 @@ def list_documents( r"""Lists documents. Args: - request (google.cloud.firestore_v1.types.ListDocumentsRequest): + request (Union[google.cloud.firestore_v1.types.ListDocumentsRequest, dict]): The request object. The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -468,7 +458,7 @@ def list_documents( def update_document( self, - request: firestore.UpdateDocumentRequest = None, + request: Union[firestore.UpdateDocumentRequest, dict] = None, *, document: gf_document.Document = None, update_mask: common.DocumentMask = None, @@ -479,7 +469,7 @@ def update_document( r"""Updates or inserts a document. Args: - request (google.cloud.firestore_v1.types.UpdateDocumentRequest): + request (Union[google.cloud.firestore_v1.types.UpdateDocumentRequest, dict]): The request object. The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. document (google.cloud.firestore_v1.types.Document): @@ -559,7 +549,7 @@ def update_document( def delete_document( self, - request: firestore.DeleteDocumentRequest = None, + request: Union[firestore.DeleteDocumentRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -569,7 +559,7 @@ def delete_document( r"""Deletes a document. Args: - request (google.cloud.firestore_v1.types.DeleteDocumentRequest): + request (Union[google.cloud.firestore_v1.types.DeleteDocumentRequest, dict]): The request object. The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. name (str): @@ -624,7 +614,7 @@ def delete_document( def batch_get_documents( self, - request: firestore.BatchGetDocumentsRequest = None, + request: Union[firestore.BatchGetDocumentsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -635,7 +625,7 @@ def batch_get_documents( be returned in the same order that they were requested. Args: - request (google.cloud.firestore_v1.types.BatchGetDocumentsRequest): + request (Union[google.cloud.firestore_v1.types.BatchGetDocumentsRequest, dict]): The request object. The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -676,7 +666,7 @@ def batch_get_documents( def begin_transaction( self, - request: firestore.BeginTransactionRequest = None, + request: Union[firestore.BeginTransactionRequest, dict] = None, *, database: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -686,7 +676,7 @@ def begin_transaction( r"""Starts a new transaction. Args: - request (google.cloud.firestore_v1.types.BeginTransactionRequest): + request (Union[google.cloud.firestore_v1.types.BeginTransactionRequest, dict]): The request object. The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. database (str): @@ -747,7 +737,7 @@ def begin_transaction( def commit( self, - request: firestore.CommitRequest = None, + request: Union[firestore.CommitRequest, dict] = None, *, database: str = None, writes: Sequence[gf_write.Write] = None, @@ -759,7 +749,7 @@ def commit( documents. Args: - request (google.cloud.firestore_v1.types.CommitRequest): + request (Union[google.cloud.firestore_v1.types.CommitRequest, dict]): The request object. The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. database (str): @@ -829,7 +819,7 @@ def commit( def rollback( self, - request: firestore.RollbackRequest = None, + request: Union[firestore.RollbackRequest, dict] = None, *, database: str = None, transaction: bytes = None, @@ -840,7 +830,7 @@ def rollback( r"""Rolls back a transaction. Args: - request (google.cloud.firestore_v1.types.RollbackRequest): + request (Union[google.cloud.firestore_v1.types.RollbackRequest, dict]): The request object. The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. database (str): @@ -903,7 +893,7 @@ def rollback( def run_query( self, - request: firestore.RunQueryRequest = None, + request: Union[firestore.RunQueryRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -912,7 +902,7 @@ def run_query( r"""Runs a query. Args: - request (google.cloud.firestore_v1.types.RunQueryRequest): + request (Union[google.cloud.firestore_v1.types.RunQueryRequest, dict]): The request object. The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -953,7 +943,7 @@ def run_query( def partition_query( self, - request: firestore.PartitionQueryRequest = None, + request: Union[firestore.PartitionQueryRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -966,7 +956,7 @@ def partition_query( results. Args: - request (google.cloud.firestore_v1.types.PartitionQueryRequest): + request (Union[google.cloud.firestore_v1.types.PartitionQueryRequest, dict]): The request object. The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1109,7 +1099,7 @@ def listen( def list_collection_ids( self, - request: firestore.ListCollectionIdsRequest = None, + request: Union[firestore.ListCollectionIdsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1119,7 +1109,7 @@ def list_collection_ids( r"""Lists all the collection IDs underneath a document. Args: - request (google.cloud.firestore_v1.types.ListCollectionIdsRequest): + request (Union[google.cloud.firestore_v1.types.ListCollectionIdsRequest, dict]): The request object. The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. parent (str): @@ -1191,7 +1181,7 @@ def list_collection_ids( def batch_write( self, - request: firestore.BatchWriteRequest = None, + request: Union[firestore.BatchWriteRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1210,7 +1200,7 @@ def batch_write( [Commit][google.firestore.v1.Firestore.Commit] instead. Args: - request (google.cloud.firestore_v1.types.BatchWriteRequest): + request (Union[google.cloud.firestore_v1.types.BatchWriteRequest, dict]): The request object. The request for [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite]. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -1251,7 +1241,7 @@ def batch_write( def create_document( self, - request: firestore.CreateDocumentRequest = None, + request: Union[firestore.CreateDocumentRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -1260,7 +1250,7 @@ def create_document( r"""Creates a new document. Args: - request (google.cloud.firestore_v1.types.CreateDocumentRequest): + request (Union[google.cloud.firestore_v1.types.CreateDocumentRequest, dict]): The request object. The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/firestore_v1/services/firestore/transports/base.py b/google/cloud/firestore_v1/services/firestore/transports/base.py index 026e080cb..b49386c4b 100644 --- a/google/cloud/firestore_v1/services/firestore/transports/base.py +++ b/google/cloud/firestore_v1/services/firestore/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/firestore_v1/services/firestore/transports/grpc.py b/google/cloud/firestore_v1/services/firestore/transports/grpc.py index 249f20b73..90df91ff6 100644 --- a/google/cloud/firestore_v1/services/firestore/transports/grpc.py +++ b/google/cloud/firestore_v1/services/firestore/transports/grpc.py @@ -90,16 +90,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py b/google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py index d42a50259..5b7367a09 100644 --- a/google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py +++ b/google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py @@ -137,16 +137,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/scripts/fixup_firestore_admin_v1_keywords.py b/scripts/fixup_firestore_admin_v1_keywords.py index bd5f8dd36..900842cb4 100644 --- a/scripts/fixup_firestore_admin_v1_keywords.py +++ b/scripts/fixup_firestore_admin_v1_keywords.py @@ -45,15 +45,15 @@ def partition( class firestore_adminCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'create_index': ('parent', 'index', ), - 'delete_index': ('name', ), - 'export_documents': ('name', 'collection_ids', 'output_uri_prefix', ), - 'get_field': ('name', ), - 'get_index': ('name', ), - 'import_documents': ('name', 'collection_ids', 'input_uri_prefix', ), - 'list_fields': ('parent', 'filter', 'page_size', 'page_token', ), - 'list_indexes': ('parent', 'filter', 'page_size', 'page_token', ), - 'update_field': ('field', 'update_mask', ), + 'create_index': ('parent', 'index', ), + 'delete_index': ('name', ), + 'export_documents': ('name', 'collection_ids', 'output_uri_prefix', ), + 'get_field': ('name', ), + 'get_index': ('name', ), + 'import_documents': ('name', 'collection_ids', 'input_uri_prefix', ), + 'list_fields': ('parent', 'filter', 'page_size', 'page_token', ), + 'list_indexes': ('parent', 'filter', 'page_size', 'page_token', ), + 'update_field': ('field', 'update_mask', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -72,7 +72,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs ) diff --git a/scripts/fixup_firestore_v1_keywords.py b/scripts/fixup_firestore_v1_keywords.py index 8f71f6285..8396e9f2d 100644 --- a/scripts/fixup_firestore_v1_keywords.py +++ b/scripts/fixup_firestore_v1_keywords.py @@ -45,21 +45,21 @@ def partition( class firestoreCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'batch_get_documents': ('database', 'documents', 'mask', 'transaction', 'new_transaction', 'read_time', ), - 'batch_write': ('database', 'writes', 'labels', ), - 'begin_transaction': ('database', 'options', ), - 'commit': ('database', 'writes', 'transaction', ), - 'create_document': ('parent', 'collection_id', 'document', 'document_id', 'mask', ), - 'delete_document': ('name', 'current_document', ), - 'get_document': ('name', 'mask', 'transaction', 'read_time', ), - 'list_collection_ids': ('parent', 'page_size', 'page_token', ), - 'list_documents': ('parent', 'collection_id', 'page_size', 'page_token', 'order_by', 'mask', 'transaction', 'read_time', 'show_missing', ), - 'listen': ('database', 'add_target', 'remove_target', 'labels', ), - 'partition_query': ('parent', 'structured_query', 'partition_count', 'page_token', 'page_size', ), - 'rollback': ('database', 'transaction', ), - 'run_query': ('parent', 'structured_query', 'transaction', 'new_transaction', 'read_time', ), - 'update_document': ('document', 'update_mask', 'mask', 'current_document', ), - 'write': ('database', 'stream_id', 'writes', 'stream_token', 'labels', ), + 'batch_get_documents': ('database', 'documents', 'mask', 'transaction', 'new_transaction', 'read_time', ), + 'batch_write': ('database', 'writes', 'labels', ), + 'begin_transaction': ('database', 'options', ), + 'commit': ('database', 'writes', 'transaction', ), + 'create_document': ('parent', 'collection_id', 'document', 'document_id', 'mask', ), + 'delete_document': ('name', 'current_document', ), + 'get_document': ('name', 'mask', 'transaction', 'read_time', ), + 'list_collection_ids': ('parent', 'page_size', 'page_token', ), + 'list_documents': ('parent', 'collection_id', 'page_size', 'page_token', 'order_by', 'mask', 'transaction', 'read_time', 'show_missing', ), + 'listen': ('database', 'add_target', 'remove_target', 'labels', ), + 'partition_query': ('parent', 'structured_query', 'partition_count', 'page_token', 'page_size', ), + 'rollback': ('database', 'transaction', ), + 'run_query': ('parent', 'structured_query', 'transaction', 'new_transaction', 'read_time', ), + 'update_document': ('document', 'update_mask', 'mask', 'current_document', ), + 'write': ('database', 'stream_id', 'writes', 'stream_token', 'labels', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -78,7 +78,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs )