Skip to content

Commit bf7b810

Browse files
yoshi-automationbusunkim96
authored andcommitted
Allow kwargs to be passed to create_channel (via synth). (googleapis#8411)
1 parent 29487e3 commit bf7b810

File tree

9 files changed

+53
-21
lines changed

9 files changed

+53
-21
lines changed

vision/google/cloud/vision_v1/gapic/transports/image_annotator_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def __init__(
8080
)
8181

8282
@classmethod
83-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
83+
def create_channel(
84+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
85+
):
8486
"""Create and return a gRPC channel object.
8587
8688
Args:
@@ -90,12 +92,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9092
credentials identify this application to the service. If
9193
none are specified, the client will attempt to ascertain
9294
the credentials from the environment.
95+
kwargs (dict): Keyword arguments, which are passed to the
96+
channel creation.
9397
9498
Returns:
9599
grpc.Channel: A gRPC channel object.
96100
"""
97101
return google.api_core.grpc_helpers.create_channel(
98-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
102+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
99103
)
100104

101105
@property

vision/google/cloud/vision_v1/gapic/transports/product_search_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def __init__(
8282
)
8383

8484
@classmethod
85-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
85+
def create_channel(
86+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
87+
):
8688
"""Create and return a gRPC channel object.
8789
8890
Args:
@@ -92,12 +94,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9294
credentials identify this application to the service. If
9395
none are specified, the client will attempt to ascertain
9496
the credentials from the environment.
97+
kwargs (dict): Keyword arguments, which are passed to the
98+
channel creation.
9599
96100
Returns:
97101
grpc.Channel: A gRPC channel object.
98102
"""
99103
return google.api_core.grpc_helpers.create_channel(
100-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
104+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
101105
)
102106

103107
@property

vision/google/cloud/vision_v1p1beta1/gapic/transports/image_annotator_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ def __init__(
7272
}
7373

7474
@classmethod
75-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
75+
def create_channel(
76+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
77+
):
7678
"""Create and return a gRPC channel object.
7779
7880
Args:
@@ -82,12 +84,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
8284
credentials identify this application to the service. If
8385
none are specified, the client will attempt to ascertain
8486
the credentials from the environment.
87+
kwargs (dict): Keyword arguments, which are passed to the
88+
channel creation.
8589
8690
Returns:
8791
grpc.Channel: A gRPC channel object.
8892
"""
8993
return google.api_core.grpc_helpers.create_channel(
90-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
94+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
9195
)
9296

9397
@property

vision/google/cloud/vision_v1p2beta1/gapic/transports/image_annotator_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def __init__(
8080
)
8181

8282
@classmethod
83-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
83+
def create_channel(
84+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
85+
):
8486
"""Create and return a gRPC channel object.
8587
8688
Args:
@@ -90,12 +92,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9092
credentials identify this application to the service. If
9193
none are specified, the client will attempt to ascertain
9294
the credentials from the environment.
95+
kwargs (dict): Keyword arguments, which are passed to the
96+
channel creation.
9397
9498
Returns:
9599
grpc.Channel: A gRPC channel object.
96100
"""
97101
return google.api_core.grpc_helpers.create_channel(
98-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
102+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
99103
)
100104

101105
@property

vision/google/cloud/vision_v1p3beta1/gapic/transports/image_annotator_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def __init__(
8080
)
8181

8282
@classmethod
83-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
83+
def create_channel(
84+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
85+
):
8486
"""Create and return a gRPC channel object.
8587
8688
Args:
@@ -90,12 +92,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9092
credentials identify this application to the service. If
9193
none are specified, the client will attempt to ascertain
9294
the credentials from the environment.
95+
kwargs (dict): Keyword arguments, which are passed to the
96+
channel creation.
9397
9498
Returns:
9599
grpc.Channel: A gRPC channel object.
96100
"""
97101
return google.api_core.grpc_helpers.create_channel(
98-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
102+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
99103
)
100104

101105
@property

vision/google/cloud/vision_v1p3beta1/gapic/transports/product_search_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def __init__(
8282
)
8383

8484
@classmethod
85-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
85+
def create_channel(
86+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
87+
):
8688
"""Create and return a gRPC channel object.
8789
8890
Args:
@@ -92,12 +94,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9294
credentials identify this application to the service. If
9395
none are specified, the client will attempt to ascertain
9496
the credentials from the environment.
97+
kwargs (dict): Keyword arguments, which are passed to the
98+
channel creation.
9599
96100
Returns:
97101
grpc.Channel: A gRPC channel object.
98102
"""
99103
return google.api_core.grpc_helpers.create_channel(
100-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
104+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
101105
)
102106

103107
@property

vision/google/cloud/vision_v1p4beta1/gapic/transports/image_annotator_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def __init__(
8080
)
8181

8282
@classmethod
83-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
83+
def create_channel(
84+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
85+
):
8486
"""Create and return a gRPC channel object.
8587
8688
Args:
@@ -90,12 +92,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9092
credentials identify this application to the service. If
9193
none are specified, the client will attempt to ascertain
9294
the credentials from the environment.
95+
kwargs (dict): Keyword arguments, which are passed to the
96+
channel creation.
9397
9498
Returns:
9599
grpc.Channel: A gRPC channel object.
96100
"""
97101
return google.api_core.grpc_helpers.create_channel(
98-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
102+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
99103
)
100104

101105
@property

vision/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def __init__(
8282
)
8383

8484
@classmethod
85-
def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
85+
def create_channel(
86+
cls, address="vision.googleapis.com:443", credentials=None, **kwargs
87+
):
8688
"""Create and return a gRPC channel object.
8789
8890
Args:
@@ -92,12 +94,14 @@ def create_channel(cls, address="vision.googleapis.com:443", credentials=None):
9294
credentials identify this application to the service. If
9395
none are specified, the client will attempt to ascertain
9496
the credentials from the environment.
97+
kwargs (dict): Keyword arguments, which are passed to the
98+
channel creation.
9599
96100
Returns:
97101
grpc.Channel: A gRPC channel object.
98102
"""
99103
return google.api_core.grpc_helpers.create_channel(
100-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
104+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
101105
)
102106

103107
@property

vision/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-06-15T12:39:06.091172Z",
2+
"updateTime": "2019-06-18T12:37:37.751743Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.26.0",
8-
"dockerImage": "googleapis/artman@sha256:6db0735b0d3beec5b887153a2a7c7411fc7bb53f73f6f389a822096bd14a3a15"
7+
"version": "0.27.0",
8+
"dockerImage": "googleapis/artman@sha256:b036a7f4278d9deb5796f065e5c7f608d47d75369985ca7ab5039998120e972d"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "7b58b37559f6a5337c4c564518e9573d742df225",
16-
"internalRef": "253322136"
15+
"sha": "384aa843867c4d17756d14a01f047b6368494d32",
16+
"internalRef": "253675319"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)