Skip to content

Commit

Permalink
feat: add missing_value_interpretations to AppendRowsRequest (#529)
Browse files Browse the repository at this point in the history
* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: remove stale header guidance for AppendRows

PiperOrigin-RevId: 485941276

Source-Link: googleapis/googleapis@a5f5928

Source-Link: googleapis/googleapis-gen@61ebfaa
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlYmZhYTMyNTEwMWJjOWIyOWVlMzQ5MDBiNDViMmYwZDIzOTgxZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update version in gapic_version.py

* chore: Update to gapic-generator-python 1.6.0

feat(python): Add typing to proto.Message based class attributes

feat(python): Snippetgen handling of repeated enum field

PiperOrigin-RevId: 487326846

Source-Link: googleapis/googleapis@da380c7

Source-Link: googleapis/googleapis-gen@61ef576
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.6.1

PiperOrigin-RevId: 488036204

Source-Link: googleapis/googleapis@08f275f

Source-Link: googleapis/googleapis-gen@555c094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add missing_value_interpretations to AppendRowsRequest

PiperOrigin-RevId: 488693558

Source-Link: googleapis/googleapis@43bf96f

Source-Link: googleapis/googleapis-gen@1532dc6
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTUzMmRjNmZkNWI1MmE1MzYxMzMwNGU3NWFhYzFiNWRhNDA3YjZiMyJ9

* 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Rosie Zou <rosiezou@users.noreply.github.com>
  • Loading branch information
4 people authored Nov 27, 2022
1 parent 4613f12 commit 2ba8bae
Show file tree
Hide file tree
Showing 44 changed files with 3,533 additions and 461 deletions.
1 change: 0 additions & 1 deletion docs/bigquery_storage_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Bigquery Storage v1 API

.. automodule:: google.cloud.bigquery_storage_v1.types
:members:
:undoc-members:
:show-inheritance:
1 change: 0 additions & 1 deletion docs/bigquery_storage_v1beta2/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Bigquery Storage v1beta2 API

.. automodule:: google.cloud.bigquery_storage_v1beta2.types
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions google/cloud/bigquery_storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.bigquery_storage import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.bigquery_storage_v1 import BigQueryReadClient
from google.cloud.bigquery_storage_v1.services.big_query_write.client import (
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/bigquery_storage/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
AsyncIterable,
Awaitable,
Expand Down Expand Up @@ -173,9 +175,9 @@ def transport(self) -> BigQueryReadTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, BigQueryReadTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the big query read client.
Expand Down Expand Up @@ -219,13 +221,13 @@ def __init__(

async def create_read_session(
self,
request: Union[storage.CreateReadSessionRequest, dict] = None,
request: Optional[Union[storage.CreateReadSessionRequest, dict]] = None,
*,
parent: str = None,
read_session: stream.ReadSession = None,
max_stream_count: int = None,
parent: Optional[str] = None,
read_session: Optional[stream.ReadSession] = None,
max_stream_count: Optional[int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> stream.ReadSession:
r"""Creates a new read session. A read session divides
Expand Down Expand Up @@ -279,7 +281,7 @@ async def sample_create_read_session():
print(response)
Args:
request (Union[google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest, dict]):
request (Optional[Union[google.cloud.bigquery_storage_v1.types.CreateReadSessionRequest, dict]]):
The request object. Request message for
`CreateReadSession`.
parent (:class:`str`):
Expand Down Expand Up @@ -382,12 +384,12 @@ async def sample_create_read_session():

def read_rows(
self,
request: Union[storage.ReadRowsRequest, dict] = None,
request: Optional[Union[storage.ReadRowsRequest, dict]] = None,
*,
read_stream: str = None,
offset: int = None,
read_stream: Optional[str] = None,
offset: Optional[int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> Awaitable[AsyncIterable[storage.ReadRowsResponse]]:
r"""Reads rows from the stream in the format prescribed
Expand Down Expand Up @@ -427,7 +429,7 @@ async def sample_read_rows():
print(response)
Args:
request (Union[google.cloud.bigquery_storage_v1.types.ReadRowsRequest, dict]):
request (Optional[Union[google.cloud.bigquery_storage_v1.types.ReadRowsRequest, dict]]):
The request object. Request message for `ReadRows`.
read_stream (:class:`str`):
Required. Stream to read rows from.
Expand Down Expand Up @@ -513,10 +515,10 @@ async def sample_read_rows():

async def split_read_stream(
self,
request: Union[storage.SplitReadStreamRequest, dict] = None,
request: Optional[Union[storage.SplitReadStreamRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> storage.SplitReadStreamResponse:
r"""Splits a given ``ReadStream`` into two ``ReadStream`` objects.
Expand Down Expand Up @@ -560,7 +562,7 @@ async def sample_split_read_stream():
print(response)
Args:
request (Union[google.cloud.bigquery_storage_v1.types.SplitReadStreamRequest, dict]):
request (Optional[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,
Expand Down
45 changes: 29 additions & 16 deletions google/cloud/bigquery_storage_v1/services/big_query_read/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Mapping, Optional, Iterable, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Iterable,
Sequence,
Tuple,
Type,
Union,
cast,
)
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -58,7 +70,7 @@ class BigQueryReadClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[BigQueryReadTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -381,8 +393,8 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, BigQueryReadTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
transport: Optional[Union[str, BigQueryReadTransport]] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the big query read client.
Expand All @@ -396,7 +408,7 @@ def __init__(
transport (Union[str, BigQueryReadTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
Expand Down Expand Up @@ -426,6 +438,7 @@ def __init__(
client_options = client_options_lib.from_dict(client_options)
if client_options is None:
client_options = client_options_lib.ClientOptions()
client_options = cast(client_options_lib.ClientOptions, client_options)

api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
client_options
Expand Down Expand Up @@ -478,13 +491,13 @@ def __init__(

def create_read_session(
self,
request: Union[storage.CreateReadSessionRequest, dict] = None,
request: Optional[Union[storage.CreateReadSessionRequest, dict]] = None,
*,
parent: str = None,
read_session: stream.ReadSession = None,
max_stream_count: int = None,
parent: Optional[str] = None,
read_session: Optional[stream.ReadSession] = None,
max_stream_count: Optional[int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> stream.ReadSession:
r"""Creates a new read session. A read session divides
Expand Down Expand Up @@ -631,12 +644,12 @@ def sample_create_read_session():

def read_rows(
self,
request: Union[storage.ReadRowsRequest, dict] = None,
request: Optional[Union[storage.ReadRowsRequest, dict]] = None,
*,
read_stream: str = None,
offset: int = None,
read_stream: Optional[str] = None,
offset: Optional[int] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> Iterable[storage.ReadRowsResponse]:
r"""Reads rows from the stream in the format prescribed
Expand Down Expand Up @@ -753,10 +766,10 @@ def sample_read_rows():

def split_read_stream(
self,
request: Union[storage.SplitReadStreamRequest, dict] = None,
request: Optional[Union[storage.SplitReadStreamRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> storage.SplitReadStreamResponse:
r"""Splits a given ``ReadStream`` into two ``ReadStream`` objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
self,
*,
host: str = DEFAULT_HOST,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def __init__(
self,
*,
host: str = "bigquerystorage.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
scopes: Sequence[str] = None,
channel: grpc.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
Expand Down Expand Up @@ -183,8 +183,8 @@ def __init__(
def create_channel(
cls,
host: str = "bigquerystorage.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
**kwargs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BigQueryReadGrpcAsyncIOTransport(BigQueryReadTransport):
def create_channel(
cls,
host: str = "bigquerystorage.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down Expand Up @@ -94,15 +94,15 @@ def __init__(
self,
*,
host: str = "bigquerystorage.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: aio.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
channel: Optional[aio.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
api_audience: Optional[str] = None,
Expand Down
Loading

0 comments on commit 2ba8bae

Please sign in to comment.