From 201ae3e10cad75b0463ee28f70571e23a1f83aec Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:20:11 -0500 Subject: [PATCH] docs: mark BigQueryWrite v1beta2 as deprecated (#750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: mark BigQueryWrite v1beta2 as deprecated PiperOrigin-RevId: 610968688 Source-Link: https://github.com/googleapis/googleapis/commit/8b91ac45618dfcf1a0b5e6aab7490b0895e4a451 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c742e2bbd6b8379c5e46c593d46ea8829e1a2106 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzc0MmUyYmJkNmI4Mzc5YzVlNDZjNTkzZDQ2ZWE4ODI5ZTFhMjEwNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../services/big_query_write/async_client.py | 28 +++++++++++++++++++ .../services/big_query_write/client.py | 25 +++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py index 0821b58f..ed59eea7 100644 --- a/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py +++ b/google/cloud/bigquery_storage_v1beta2/services/big_query_write/async_client.py @@ -30,6 +30,7 @@ Type, Union, ) +import warnings from google.cloud.bigquery_storage_v1beta2 import gapic_version as package_version @@ -340,6 +341,11 @@ async def sample_create_write_stream(): system. """ + warnings.warn( + "BigQueryWriteAsyncClient.create_write_stream is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -478,6 +484,9 @@ def request_generator(): AsyncIterable[google.cloud.bigquery_storage_v1beta2.types.AppendRowsResponse]: Response message for AppendRows. """ + warnings.warn( + "BigQueryWriteAsyncClient.append_rows is deprecated", DeprecationWarning + ) # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. @@ -575,6 +584,11 @@ async def sample_get_write_stream(): system. """ + warnings.warn( + "BigQueryWriteAsyncClient.get_write_stream is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -688,6 +702,11 @@ async def sample_finalize_write_stream(): google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamResponse: Response message for FinalizeWriteStream. """ + warnings.warn( + "BigQueryWriteAsyncClient.finalize_write_stream is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -806,6 +825,11 @@ async def sample_batch_commit_write_streams(): google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsResponse: Response message for BatchCommitWriteStreams. """ + warnings.warn( + "BigQueryWriteAsyncClient.batch_commit_write_streams is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -923,6 +947,10 @@ async def sample_flush_rows(): google.cloud.bigquery_storage_v1beta2.types.FlushRowsResponse: Respond message for FlushRows. """ + warnings.warn( + "BigQueryWriteAsyncClient.flush_rows is deprecated", DeprecationWarning + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. 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 3e95fc42..e31dce42 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 @@ -770,6 +770,10 @@ def sample_create_write_stream(): system. """ + warnings.warn( + "BigQueryWriteClient.create_write_stream is deprecated", DeprecationWarning + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -897,6 +901,9 @@ def request_generator(): Iterable[google.cloud.bigquery_storage_v1beta2.types.AppendRowsResponse]: Response message for AppendRows. """ + warnings.warn( + "BigQueryWriteClient.append_rows is deprecated", DeprecationWarning + ) # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. @@ -980,6 +987,10 @@ def sample_get_write_stream(): system. """ + warnings.warn( + "BigQueryWriteClient.get_write_stream is deprecated", DeprecationWarning + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -1083,6 +1094,11 @@ def sample_finalize_write_stream(): google.cloud.bigquery_storage_v1beta2.types.FinalizeWriteStreamResponse: Response message for FinalizeWriteStream. """ + warnings.warn( + "BigQueryWriteClient.finalize_write_stream is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -1191,6 +1207,11 @@ def sample_batch_commit_write_streams(): google.cloud.bigquery_storage_v1beta2.types.BatchCommitWriteStreamsResponse: Response message for BatchCommitWriteStreams. """ + warnings.warn( + "BigQueryWriteClient.batch_commit_write_streams is deprecated", + DeprecationWarning, + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. @@ -1300,6 +1321,10 @@ def sample_flush_rows(): google.cloud.bigquery_storage_v1beta2.types.FlushRowsResponse: Respond message for FlushRows. """ + warnings.warn( + "BigQueryWriteClient.flush_rows is deprecated", DeprecationWarning + ) + # Create or coerce a protobuf request object. # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request.