Skip to content

Commit 824a177

Browse files
committed
migrate to autogenerated google/cloud/bigquery_storage_v1beta2/__init__.py with post processing
1 parent a7dae47 commit 824a177

File tree

2 files changed

+90
-6
lines changed

2 files changed

+90
-6
lines changed

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1beta2/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2020 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
from __future__ import absolute_import
18-
15+
#
1916
from google.cloud.bigquery_storage_v1beta2 import gapic_version as package_version
2017

2118
__version__ = package_version.__version__

scripts/client-post-processing/bigquery-storage-integration.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,90 @@ replacements:
343343
after: |
344344
__version__ = package_version.__version__
345345
count: 2
346+
# Given that this file is mostly handwritten, we could omit the file completely when we migrate to librarian
347+
# See `preserve_regex` in https://github.com/googleapis/librarian/blob/main/doc/language-onboarding.md#generate
348+
- paths: [
349+
packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1beta2/__init__.py,
350+
]
351+
before: |
352+
__version__ = package_version.__version__\n\n
353+
from .services.big_query_read import BigQueryReadAsyncClient, BigQueryReadClient
354+
from .services.big_query_write import BigQueryWriteAsyncClient, BigQueryWriteClient
355+
from .types.arrow import ArrowRecordBatch, ArrowSchema, ArrowSerializationOptions
356+
from .types.avro import AvroRows, AvroSchema
357+
from .types.protobuf import ProtoRows, ProtoSchema
358+
from .types.storage import \(
359+
AppendRowsRequest,
360+
AppendRowsResponse,
361+
BatchCommitWriteStreamsRequest,
362+
BatchCommitWriteStreamsResponse,
363+
CreateReadSessionRequest,
364+
CreateWriteStreamRequest,
365+
FinalizeWriteStreamRequest,
366+
FinalizeWriteStreamResponse,
367+
FlushRowsRequest,
368+
FlushRowsResponse,
369+
GetWriteStreamRequest,
370+
ReadRowsRequest,
371+
ReadRowsResponse,
372+
SplitReadStreamRequest,
373+
SplitReadStreamResponse,
374+
StorageError,
375+
StreamStats,
376+
ThrottleState,
377+
\)
378+
from .types.stream import DataFormat, ReadSession, ReadStream, WriteStream
379+
from .types.table import TableFieldSchema, TableSchema\n
380+
__all__ = \(
381+
"BigQueryReadAsyncClient",
382+
"BigQueryWriteAsyncClient",
383+
"AppendRowsRequest",
384+
"AppendRowsResponse",
385+
"ArrowRecordBatch",
386+
"ArrowSchema",
387+
"ArrowSerializationOptions",
388+
"AvroRows",
389+
"AvroSchema",
390+
"BatchCommitWriteStreamsRequest",
391+
"BatchCommitWriteStreamsResponse",
392+
"BigQueryReadClient",
393+
"BigQueryWriteClient",
394+
"CreateReadSessionRequest",
395+
"CreateWriteStreamRequest",
396+
"DataFormat",
397+
"FinalizeWriteStreamRequest",
398+
"FinalizeWriteStreamResponse",
399+
"FlushRowsRequest",
400+
"FlushRowsResponse",
401+
"GetWriteStreamRequest",
402+
"ProtoRows",
403+
"ProtoSchema",
404+
"ReadRowsRequest",
405+
"ReadRowsResponse",
406+
"ReadSession",
407+
"ReadStream",
408+
"SplitReadStreamRequest",
409+
"SplitReadStreamResponse",
410+
"StorageError",
411+
"StreamStats",
412+
"TableFieldSchema",
413+
"TableSchema",
414+
"ThrottleState",
415+
"WriteStream",
416+
\)
417+
after: |
418+
__version__ = package_version.__version__\n
419+
from google.cloud.bigquery_storage_v1beta2 import client, types\n\n
420+
class BigQueryReadClient(client.BigQueryReadClient):
421+
__doc__ = client.BigQueryReadClient.__doc__\n\n
422+
class BigQueryWriteClient(client.BigQueryWriteClient):
423+
__doc__ = client.BigQueryWriteClient.__doc__\n\n
424+
__all__ = (
425+
# google.cloud.bigquery_storage_v1beta2
426+
"__version__",
427+
"types",
428+
# google.cloud.bigquery_storage_v1beta2.client
429+
"BigQueryReadClient",
430+
"BigQueryWriteClient",
431+
)
432+
count: 1

0 commit comments

Comments
 (0)