From fb0179e4e7ca40b1325838d0fe1bd89fd232af30 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 18 Jun 2019 10:51:29 -0700 Subject: [PATCH] Allow kwargs to be passed to create_channel (via synth). (#8390) --- .../gapic/transports/firestore_grpc_transport.py | 8 ++++++-- .../gapic/transports/firestore_grpc_transport.py | 8 ++++++-- firestore/synth.metadata | 10 +++++----- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/firestore/google/cloud/firestore_v1/gapic/transports/firestore_grpc_transport.py b/firestore/google/cloud/firestore_v1/gapic/transports/firestore_grpc_transport.py index 22bbdbe314ae..52199c047141 100644 --- a/firestore/google/cloud/firestore_v1/gapic/transports/firestore_grpc_transport.py +++ b/firestore/google/cloud/firestore_v1/gapic/transports/firestore_grpc_transport.py @@ -70,7 +70,9 @@ def __init__( self._stubs = {"firestore_stub": firestore_pb2_grpc.FirestoreStub(channel)} @classmethod - def create_channel(cls, address="firestore.googleapis.com:443", credentials=None): + def create_channel( + cls, address="firestore.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -80,12 +82,14 @@ def create_channel(cls, address="firestore.googleapis.com:443", credentials=None credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. + kwargs (dict): Keyword arguments, which are passed to the + channel creation. Returns: grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=cls._OAUTH_SCOPES + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/firestore/google/cloud/firestore_v1beta1/gapic/transports/firestore_grpc_transport.py b/firestore/google/cloud/firestore_v1beta1/gapic/transports/firestore_grpc_transport.py index ff54b9e3e84e..fdb5d476ccca 100644 --- a/firestore/google/cloud/firestore_v1beta1/gapic/transports/firestore_grpc_transport.py +++ b/firestore/google/cloud/firestore_v1beta1/gapic/transports/firestore_grpc_transport.py @@ -70,7 +70,9 @@ def __init__( self._stubs = {"firestore_stub": firestore_pb2_grpc.FirestoreStub(channel)} @classmethod - def create_channel(cls, address="firestore.googleapis.com:443", credentials=None): + def create_channel( + cls, address="firestore.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -80,12 +82,14 @@ def create_channel(cls, address="firestore.googleapis.com:443", credentials=None credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. + kwargs (dict): Keyword arguments, which are passed to the + channel creation. Returns: grpc.Channel: A gRPC channel object. """ return google.api_core.grpc_helpers.create_channel( - address, credentials=credentials, scopes=cls._OAUTH_SCOPES + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/firestore/synth.metadata b/firestore/synth.metadata index 948895baab8d..b35ad7407108 100644 --- a/firestore/synth.metadata +++ b/firestore/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-06-15T12:19:20.490862Z", + "updateTime": "2019-06-18T12:18:03.728835Z", "sources": [ { "generator": { "name": "artman", - "version": "0.26.0", - "dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15" + "version": "0.27.0", + "dockerImage": "googleapis/artman@sha256:b036a7f4278d9deb5796f065e5c7f608d47d75369985ca7ab5039998120e972d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7b58b37559f6a5337c4c564518e9573d742df225", - "internalRef": "253322136" + "sha": "384aa843867c4d17756d14a01f047b6368494d32", + "internalRef": "253675319" } }, {