From f150780454a29770781e3bdd1a21718efe92de56 Mon Sep 17 00:00:00 2001 From: Yiru Tang Date: Tue, 2 Jan 2024 14:40:25 -0800 Subject: [PATCH] feat: Adding deprecated message to v1beta2 manual client (#2098) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Adding deprecated message to v1beta2 manual client * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 --- .../storage/v1beta2/BQTableSchemaToProtoDescriptor.java | 1 + .../cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java | 1 + .../cloud/bigquery/storage/v1beta2/JsonStreamWriter.java | 3 +++ .../cloud/bigquery/storage/v1beta2/JsonToProtoMessage.java | 3 +++ .../cloud/bigquery/storage/v1beta2/ProtoSchemaConverter.java | 3 +++ .../cloud/bigquery/storage/v1beta2/StreamConnection.java | 3 +++ .../google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java | 3 +++ .../java/com/google/cloud/bigquery/storage/v1beta2/Waiter.java | 1 + 8 files changed, 18 insertions(+) diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BQTableSchemaToProtoDescriptor.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BQTableSchemaToProtoDescriptor.java index 99128101a5..e687befd29 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BQTableSchemaToProtoDescriptor.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BQTableSchemaToProtoDescriptor.java @@ -33,6 +33,7 @@ * when constructing the protobuf descriptor. The mapping between field types and field modes are * shown in the ImmutableMaps below. */ +@Deprecated public class BQTableSchemaToProtoDescriptor { private static ImmutableMap BQTableSchemaModeMap = diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java index 1ff98117b0..5ba7017b7a 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java @@ -47,6 +47,7 @@ *

When encoding the TIME or DATETIME into a bit field, larger date/time field is on the more * significant side. */ +@Deprecated public final class CivilTimeEncoder { private static final int NANO_LENGTH = 30; private static final int MICRO_LENGTH = 20; diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java index a86a35b7ab..74371fba1a 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java @@ -35,7 +35,10 @@ * A StreamWriter that can write JSON data (JSONObjects) to BigQuery tables. The JsonStreamWriter is * built on top of a StreamWriter, and it simply converts all JSON data to protobuf messages then * calls StreamWriter's append() method to write to BigQuery tables. + * + *

This client lib is deprecated, please use v1 instead. */ +@Deprecated public class JsonStreamWriter implements AutoCloseable { private static String streamPatternString = "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+"; diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonToProtoMessage.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonToProtoMessage.java index fe5ee614c4..f6d4130376 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonToProtoMessage.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonToProtoMessage.java @@ -36,7 +36,10 @@ /** * Converts Json data to protocol buffer messages given the protocol buffer descriptor. The protobuf * descriptor must have all fields lowercased. + * + *

This client lib is deprecated, please use v1 instead. */ +@Deprecated public class JsonToProtoMessage { private static final Logger LOG = Logger.getLogger(JsonToProtoMessage.class.getName()); private static ImmutableMap FieldTypeToDebugMessage = diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ProtoSchemaConverter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ProtoSchemaConverter.java index f2112a2be0..5e4e39bec0 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ProtoSchemaConverter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/ProtoSchemaConverter.java @@ -29,6 +29,9 @@ // A Converter class that turns a native protobuf::DescriptorProto to a self contained // protobuf::DescriptorProto // that can be reconstructed by the backend. +// +// This client lib is deprecated, please use v1 instead. +@Deprecated public class ProtoSchemaConverter { private static String getNameFromFullName(String fullName) { return fullName.replace('.', '_'); diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamConnection.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamConnection.java index c04f43c944..325723b6e1 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamConnection.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamConnection.java @@ -35,7 +35,10 @@ * in receiving order. * *

It's user's responsibility to do the flow control and maintain the lifetime of the requests. + * + *

This client lib is deprecated, please use v1 instead. */ +@Deprecated public class StreamConnection { private BidiStreamingCallable bidiStreamingCallable; private ClientStream clientStream; diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java index 43496f667b..1d00f07dfb 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java @@ -45,7 +45,10 @@ *

TODO: Support batching. * *

TODO: Support schema change. + * + *

This client lib is deprecated, please use v1 instead. */ +@Deprecated public class StreamWriterV2 implements AutoCloseable { private static final Logger log = Logger.getLogger(StreamWriterV2.class.getName()); diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/Waiter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/Waiter.java index 9c37a71fc0..aa6c4f679f 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/Waiter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/Waiter.java @@ -29,6 +29,7 @@ * A barrier kind of object that helps keep track of pending actions and synchronously wait until * all have completed. */ +@Deprecated class Waiter { private static final Logger LOG = Logger.getLogger(com.google.cloud.bigquery.storage.v1beta2.Waiter.class.getName());