From e5fd4e62de2768a49d633dc3a81e03d64df9fe1f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 4 Nov 2020 10:02:03 -0800 Subject: [PATCH] docs: show inheritance in types reference (#91) This PR was generated using Autosynth. :rainbow: - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 339292950 Source-Link: https://github.com/googleapis/googleapis/commit/07d41a7e5cade45aba6f0d277c89722b48f2c956 PiperOrigin-RevId: 339268186 Source-Link: https://github.com/googleapis/googleapis/commit/6516b525ee76094f1de9b7a8b0abaff91f2e5eb2 PiperOrigin-RevId: 338646463 Source-Link: https://github.com/googleapis/googleapis/commit/20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed PiperOrigin-RevId: 338489505 Source-Link: https://github.com/googleapis/googleapis/commit/4b34a0869404af9d83ae89952d28712a4d29eba6 --- docs/bigquery_storage_v1/types.rst | 1 + .../services/big_query_read/transports/grpc.py | 4 ++++ .../services/big_query_read/transports/grpc_asyncio.py | 4 ++++ scripts/fixup_bigquery_storage_v1_keywords.py | 1 + synth.metadata | 6 +++--- tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py | 3 +++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/bigquery_storage_v1/types.rst b/docs/bigquery_storage_v1/types.rst index 1eb34796..3f722c57 100644 --- a/docs/bigquery_storage_v1/types.rst +++ b/docs/bigquery_storage_v1/types.rst @@ -3,3 +3,4 @@ Types for Google Cloud Bigquery Storage v1 API .. automodule:: google.cloud.bigquery_storage_v1.types :members: + :show-inheritance: 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 547954b1..041854b9 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 @@ -103,6 +103,8 @@ def __init__( google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` and ``credentials_file`` are passed. """ + self._ssl_channel_credentials = ssl_channel_credentials + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -110,6 +112,7 @@ def __init__( # If a channel was explicitly provided, set it. self._grpc_channel = channel + self._ssl_channel_credentials = None elif api_mtls_endpoint: warnings.warn( "api_mtls_endpoint and client_cert_source are deprecated", @@ -150,6 +153,7 @@ def __init__( ("grpc.max_receive_message_length", -1), ), ) + self._ssl_channel_credentials = ssl_credentials else: host = host if ":" in host else host + ":443" 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 b383f36d..3e08afdd 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 @@ -148,6 +148,8 @@ def __init__( google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` and ``credentials_file`` are passed. """ + self._ssl_channel_credentials = ssl_channel_credentials + if channel: # Sanity check: Ensure that channel and credentials are not both # provided. @@ -155,6 +157,7 @@ def __init__( # If a channel was explicitly provided, set it. self._grpc_channel = channel + self._ssl_channel_credentials = None elif api_mtls_endpoint: warnings.warn( "api_mtls_endpoint and client_cert_source are deprecated", @@ -195,6 +198,7 @@ def __init__( ("grpc.max_receive_message_length", -1), ), ) + self._ssl_channel_credentials = ssl_credentials else: host = host if ":" in host else host + ":443" diff --git a/scripts/fixup_bigquery_storage_v1_keywords.py b/scripts/fixup_bigquery_storage_v1_keywords.py index 4fc6755e..28faf655 100644 --- a/scripts/fixup_bigquery_storage_v1_keywords.py +++ b/scripts/fixup_bigquery_storage_v1_keywords.py @@ -1,3 +1,4 @@ +#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google LLC diff --git a/synth.metadata b/synth.metadata index a1ba36c6..1cc0b185 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-bigquery-storage.git", - "sha": "fbbb439b8c77fa9367a4b5bea725dd0b0f26b769" + "sha": "8115f88db7c355c96f7cff235406e744e7b08c67" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c7331b75b0b7bbd614373b7d37085db1c80dd4be", - "internalRef": "338157137" + "sha": "07d41a7e5cade45aba6f0d277c89722b48f2c956", + "internalRef": "339292950" } }, { diff --git a/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py b/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py index 51286b52..1c3cfafb 100644 --- a/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py +++ b/tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py @@ -1194,6 +1194,7 @@ def test_big_query_read_grpc_transport_channel(): ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" + assert transport._ssl_channel_credentials == None def test_big_query_read_grpc_asyncio_transport_channel(): @@ -1205,6 +1206,7 @@ def test_big_query_read_grpc_asyncio_transport_channel(): ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" + assert transport._ssl_channel_credentials == None @pytest.mark.parametrize( @@ -1255,6 +1257,7 @@ def test_big_query_read_transport_channel_mtls_with_client_cert_source(transport ), ) assert transport.grpc_channel == mock_grpc_channel + assert transport._ssl_channel_credentials == mock_ssl_cred @pytest.mark.parametrize(