From a7780805d7350855fccdcf2aefa596851ee83923 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:14:27 +0000 Subject: [PATCH] chore: use gapic-generator-python 0.51.2 (#312) - [ ] 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/big_query_read/client.py | 14 ++++---- .../big_query_read/transports/base.py | 2 +- .../big_query_read/transports/grpc.py | 6 ++-- .../big_query_read/transports/grpc_asyncio.py | 6 ++-- .../services/big_query_write/client.py | 32 +++++++------------ .../big_query_write/transports/base.py | 2 +- .../big_query_write/transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- .../services/big_query_read/client.py | 14 ++++---- .../big_query_read/transports/base.py | 2 +- .../big_query_read/transports/grpc.py | 6 ++-- .../big_query_read/transports/grpc_asyncio.py | 6 ++-- .../services/big_query_write/client.py | 32 +++++++------------ .../big_query_write/transports/base.py | 2 +- .../big_query_write/transports/grpc.py | 6 ++-- .../transports/grpc_asyncio.py | 6 ++-- scripts/fixup_bigquery_storage_v1_keywords.py | 20 ++++++------ 17 files changed, 74 insertions(+), 94 deletions(-) diff --git a/google/cloud/bigquery_storage_v1/services/big_query_read/client.py b/google/cloud/bigquery_storage_v1/services/big_query_read/client.py index 80f8fb8c..cceb8def 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_read/client.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_read/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Iterable, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Iterable, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -389,7 +389,7 @@ def __init__( def create_read_session( self, - request: storage.CreateReadSessionRequest = None, + request: Union[storage.CreateReadSessionRequest, dict] = None, *, parent: str = None, read_session: stream.ReadSession = None, @@ -423,7 +423,7 @@ def create_read_session( caller. Args: - request (google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest): + request (Union[google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest, dict]): The request object. Request message for `CreateReadSession`. parent (str): @@ -512,7 +512,7 @@ def create_read_session( def read_rows( self, - request: storage.ReadRowsRequest = None, + request: Union[storage.ReadRowsRequest, dict] = None, *, read_stream: str = None, offset: int = None, @@ -530,7 +530,7 @@ def read_rows( reflecting the current state of the stream. Args: - request (google.cloud.bigquery_storage_v1.types.ReadRowsRequest): + request (Union[google.cloud.bigquery_storage_v1.types.ReadRowsRequest, dict]): The request object. Request message for `ReadRows`. read_stream (str): Required. Stream to read rows from. @@ -602,7 +602,7 @@ def read_rows( def split_read_stream( self, - request: storage.SplitReadStreamRequest = None, + request: Union[storage.SplitReadStreamRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -623,7 +623,7 @@ def split_read_stream( once the streams have been read to completion. Args: - request (google.cloud.bigquery_storage_v1.types.SplitReadStreamRequest): + request (Union[google.cloud.bigquery_storage_v1.types.SplitReadStreamRequest, dict]): The request object. Request message for `SplitReadStream`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py index af7f5390..3c5ad5af 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py @@ -122,7 +122,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/bigquery_storage_v1/services/big_query_read/transports/grpc.py b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py index 1ab6a270..6ad37c10 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py @@ -82,16 +82,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/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py index c138a63d..60a07966 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py @@ -129,16 +129,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/bigquery_storage_v1/services/big_query_write/client.py b/google/cloud/bigquery_storage_v1/services/big_query_write/client.py index 09233410..17d319d5 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_write/client.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_write/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 @@ -383,7 +373,7 @@ def __init__( def create_write_stream( self, - request: storage.CreateWriteStreamRequest = None, + request: Union[storage.CreateWriteStreamRequest, dict] = None, *, parent: str = None, write_stream: stream.WriteStream = None, @@ -400,7 +390,7 @@ def create_write_stream( received. Args: - request (google.cloud.bigquery_storage_v1.types.CreateWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1.types.CreateWriteStreamRequest, dict]): The request object. Request message for `CreateWriteStream`. parent (str): @@ -545,7 +535,7 @@ def append_rows( def get_write_stream( self, - request: storage.GetWriteStreamRequest = None, + request: Union[storage.GetWriteStreamRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -555,7 +545,7 @@ def get_write_stream( r"""Gets information about a write stream. Args: - request (google.cloud.bigquery_storage_v1.types.GetWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1.types.GetWriteStreamRequest, dict]): The request object. Request message for `GetWriteStreamRequest`. name (str): @@ -617,7 +607,7 @@ def get_write_stream( def finalize_write_stream( self, - request: storage.FinalizeWriteStreamRequest = None, + request: Union[storage.FinalizeWriteStreamRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -628,7 +618,7 @@ def finalize_write_stream( the stream. Finalize is not supported on the '_default' stream. Args: - request (google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1.types.FinalizeWriteStreamRequest, dict]): The request object. Request message for invoking `FinalizeWriteStream`. name (str): @@ -687,7 +677,7 @@ def finalize_write_stream( def batch_commit_write_streams( self, - request: storage.BatchCommitWriteStreamsRequest = None, + request: Union[storage.BatchCommitWriteStreamsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -702,7 +692,7 @@ def batch_commit_write_streams( becomes available for read operations. Args: - request (google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsRequest): + request (Union[google.cloud.bigquery_storage_v1.types.BatchCommitWriteStreamsRequest, dict]): The request object. Request message for `BatchCommitWriteStreams`. parent (str): @@ -764,7 +754,7 @@ def batch_commit_write_streams( def flush_rows( self, - request: storage.FlushRowsRequest = None, + request: Union[storage.FlushRowsRequest, dict] = None, *, write_stream: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -783,7 +773,7 @@ def flush_rows( BUFFERED. Args: - request (google.cloud.bigquery_storage_v1.types.FlushRowsRequest): + request (Union[google.cloud.bigquery_storage_v1.types.FlushRowsRequest, dict]): The request object. Request message for `FlushRows`. write_stream (str): Required. The stream that is the diff --git a/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py index 1ecbb93f..d6d7e078 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py @@ -122,7 +122,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/bigquery_storage_v1/services/big_query_write/transports/grpc.py b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py index 68b3b076..eaf0756c 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc.py @@ -84,16 +84,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/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py index 7202e0e3..100342b9 100644 --- a/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_storage_v1/services/big_query_write/transports/grpc_asyncio.py @@ -131,16 +131,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/bigquery_storage_v1beta2/services/big_query_read/client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py index 35675b84..3e2f7d5d 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Iterable, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Iterable, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore @@ -391,7 +391,7 @@ def __init__( def create_read_session( self, - request: storage.CreateReadSessionRequest = None, + request: Union[storage.CreateReadSessionRequest, dict] = None, *, parent: str = None, read_session: stream.ReadSession = None, @@ -425,7 +425,7 @@ def create_read_session( caller. Args: - request (google.cloud.bigquery_storage_v1beta2.types.CreateReadSessionRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.CreateReadSessionRequest, dict]): The request object. Request message for `CreateReadSession`. parent (str): @@ -514,7 +514,7 @@ def create_read_session( def read_rows( self, - request: storage.ReadRowsRequest = None, + request: Union[storage.ReadRowsRequest, dict] = None, *, read_stream: str = None, offset: int = None, @@ -532,7 +532,7 @@ def read_rows( reflecting the current state of the stream. Args: - request (google.cloud.bigquery_storage_v1beta2.types.ReadRowsRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.ReadRowsRequest, dict]): The request object. Request message for `ReadRows`. read_stream (str): Required. Stream to read rows from. @@ -604,7 +604,7 @@ def read_rows( def split_read_stream( self, - request: storage.SplitReadStreamRequest = None, + request: Union[storage.SplitReadStreamRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -625,7 +625,7 @@ def split_read_stream( once the streams have been read to completion. Args: - request (google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.SplitReadStreamRequest, dict]): The request object. Request message for `SplitReadStream`. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py index fadedc4d..621fef4b 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/base.py @@ -122,7 +122,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/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py index 42f4e733..287ad3a7 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc.py @@ -84,16 +84,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/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py index 2b7433a3..f605d3ce 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py @@ -131,16 +131,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/bigquery_storage_v1beta2/services/big_query_write/client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/client.py index a83c2baf..6ebdddb3 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/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 @@ -381,7 +371,7 @@ def __init__( def create_write_stream( self, - request: storage.CreateWriteStreamRequest = None, + request: Union[storage.CreateWriteStreamRequest, dict] = None, *, parent: str = None, write_stream: stream.WriteStream = None, @@ -398,7 +388,7 @@ def create_write_stream( received. Args: - request (google.cloud.bigquery_storage_v1beta2.types.CreateWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.CreateWriteStreamRequest, dict]): The request object. Request message for `CreateWriteStream`. parent (str): @@ -526,7 +516,7 @@ def append_rows( def get_write_stream( self, - request: storage.GetWriteStreamRequest = None, + request: Union[storage.GetWriteStreamRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -536,7 +526,7 @@ def get_write_stream( r"""Gets a write stream. Args: - request (google.cloud.bigquery_storage_v1beta2.types.GetWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.GetWriteStreamRequest, dict]): The request object. Request message for `GetWriteStreamRequest`. name (str): @@ -598,7 +588,7 @@ def get_write_stream( def finalize_write_stream( self, - request: storage.FinalizeWriteStreamRequest = None, + request: Union[storage.FinalizeWriteStreamRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -609,7 +599,7 @@ def finalize_write_stream( the stream. Finalize is not supported on the '_default' stream. Args: - request (google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamRequest, dict]): The request object. Request message for invoking `FinalizeWriteStream`. name (str): @@ -668,7 +658,7 @@ def finalize_write_stream( def batch_commit_write_streams( self, - request: storage.BatchCommitWriteStreamsRequest = None, + request: Union[storage.BatchCommitWriteStreamsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -682,7 +672,7 @@ def batch_commit_write_streams( operations. Args: - request (google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsRequest, dict]): The request object. Request message for `BatchCommitWriteStreams`. parent (str): @@ -744,7 +734,7 @@ def batch_commit_write_streams( def flush_rows( self, - request: storage.FlushRowsRequest = None, + request: Union[storage.FlushRowsRequest, dict] = None, *, write_stream: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -759,7 +749,7 @@ def flush_rows( \_default stream, since it is not BUFFERED. Args: - request (google.cloud.bigquery_storage_v1beta2.types.FlushRowsRequest): + request (Union[google.cloud.bigquery_storage_v1beta2.types.FlushRowsRequest, dict]): The request object. Request message for `FlushRows`. write_stream (str): Required. The stream that is the diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py index 78571ced..399f110b 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/base.py @@ -122,7 +122,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/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py index b9013f22..e212be91 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc.py @@ -82,16 +82,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/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py index 41597592..2b24dce6 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/transports/grpc_asyncio.py @@ -129,16 +129,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_bigquery_storage_v1_keywords.py b/scripts/fixup_bigquery_storage_v1_keywords.py index 9ba710dc..efb1cfae 100644 --- a/scripts/fixup_bigquery_storage_v1_keywords.py +++ b/scripts/fixup_bigquery_storage_v1_keywords.py @@ -39,15 +39,15 @@ def partition( class bigquery_storageCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'append_rows': ('write_stream', 'offset', 'proto_rows', 'trace_id', ), - 'batch_commit_write_streams': ('parent', 'write_streams', ), - 'create_read_session': ('parent', 'read_session', 'max_stream_count', ), - 'create_write_stream': ('parent', 'write_stream', ), - 'finalize_write_stream': ('name', ), - 'flush_rows': ('write_stream', 'offset', ), - 'get_write_stream': ('name', ), - 'read_rows': ('read_stream', 'offset', ), - 'split_read_stream': ('name', 'fraction', ), + 'append_rows': ('write_stream', 'offset', 'proto_rows', 'trace_id', ), + 'batch_commit_write_streams': ('parent', 'write_streams', ), + 'create_read_session': ('parent', 'read_session', 'max_stream_count', ), + 'create_write_stream': ('parent', 'write_stream', ), + 'finalize_write_stream': ('name', ), + 'flush_rows': ('write_stream', 'offset', ), + 'get_write_stream': ('name', ), + 'read_rows': ('read_stream', 'offset', ), + 'split_read_stream': ('name', 'fraction', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -66,7 +66,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 )