Skip to content

Commit 101901b

Browse files
yoshi-automationbusunkim96
authored andcommitted
Allow kwargs to be passed to create_channel (via synth). (googleapis#8387)
1 parent 77a62db commit 101901b

File tree

8 files changed

+47
-19
lines changed

8 files changed

+47
-19
lines changed

dataproc/google/cloud/dataproc_v1/gapic/transports/cluster_controller_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def __init__(
7777
)
7878

7979
@classmethod
80-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
80+
def create_channel(
81+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
82+
):
8183
"""Create and return a gRPC channel object.
8284
8385
Args:
@@ -87,12 +89,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
8789
credentials identify this application to the service. If
8890
none are specified, the client will attempt to ascertain
8991
the credentials from the environment.
92+
kwargs (dict): Keyword arguments, which are passed to the
93+
channel creation.
9094
9195
Returns:
9296
grpc.Channel: A gRPC channel object.
9397
"""
9498
return google.api_core.grpc_helpers.create_channel(
95-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
99+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
96100
)
97101

98102
@property

dataproc/google/cloud/dataproc_v1/gapic/transports/job_controller_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def __init__(
6767
self._stubs = {"job_controller_stub": jobs_pb2_grpc.JobControllerStub(channel)}
6868

6969
@classmethod
70-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
70+
def create_channel(
71+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
72+
):
7173
"""Create and return a gRPC channel object.
7274
7375
Args:
@@ -77,12 +79,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
7779
credentials identify this application to the service. If
7880
none are specified, the client will attempt to ascertain
7981
the credentials from the environment.
82+
kwargs (dict): Keyword arguments, which are passed to the
83+
channel creation.
8084
8185
Returns:
8286
grpc.Channel: A gRPC channel object.
8387
"""
8488
return google.api_core.grpc_helpers.create_channel(
85-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
89+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
8690
)
8791

8892
@property

dataproc/google/cloud/dataproc_v1/gapic/transports/workflow_template_service_grpc_transport.py

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

8181
@classmethod
82-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
82+
def create_channel(
83+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
84+
):
8385
"""Create and return a gRPC channel object.
8486
8587
Args:
@@ -89,12 +91,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
8991
credentials identify this application to the service. If
9092
none are specified, the client will attempt to ascertain
9193
the credentials from the environment.
94+
kwargs (dict): Keyword arguments, which are passed to the
95+
channel creation.
9296
9397
Returns:
9498
grpc.Channel: A gRPC channel object.
9599
"""
96100
return google.api_core.grpc_helpers.create_channel(
97-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
101+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
98102
)
99103

100104
@property

dataproc/google/cloud/dataproc_v1beta2/gapic/transports/autoscaling_policy_service_grpc_transport.py

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

7373
@classmethod
74-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
74+
def create_channel(
75+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
76+
):
7577
"""Create and return a gRPC channel object.
7678
7779
Args:
@@ -81,12 +83,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
8183
credentials identify this application to the service. If
8284
none are specified, the client will attempt to ascertain
8385
the credentials from the environment.
86+
kwargs (dict): Keyword arguments, which are passed to the
87+
channel creation.
8488
8589
Returns:
8690
grpc.Channel: A gRPC channel object.
8791
"""
8892
return google.api_core.grpc_helpers.create_channel(
89-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
93+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
9094
)
9195

9296
@property

dataproc/google/cloud/dataproc_v1beta2/gapic/transports/cluster_controller_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def __init__(
7777
)
7878

7979
@classmethod
80-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
80+
def create_channel(
81+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
82+
):
8183
"""Create and return a gRPC channel object.
8284
8385
Args:
@@ -87,12 +89,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
8789
credentials identify this application to the service. If
8890
none are specified, the client will attempt to ascertain
8991
the credentials from the environment.
92+
kwargs (dict): Keyword arguments, which are passed to the
93+
channel creation.
9094
9195
Returns:
9296
grpc.Channel: A gRPC channel object.
9397
"""
9498
return google.api_core.grpc_helpers.create_channel(
95-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
99+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
96100
)
97101

98102
@property

dataproc/google/cloud/dataproc_v1beta2/gapic/transports/job_controller_grpc_transport.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ def __init__(
6767
self._stubs = {"job_controller_stub": jobs_pb2_grpc.JobControllerStub(channel)}
6868

6969
@classmethod
70-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
70+
def create_channel(
71+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
72+
):
7173
"""Create and return a gRPC channel object.
7274
7375
Args:
@@ -77,12 +79,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
7779
credentials identify this application to the service. If
7880
none are specified, the client will attempt to ascertain
7981
the credentials from the environment.
82+
kwargs (dict): Keyword arguments, which are passed to the
83+
channel creation.
8084
8185
Returns:
8286
grpc.Channel: A gRPC channel object.
8387
"""
8488
return google.api_core.grpc_helpers.create_channel(
85-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
89+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
8690
)
8791

8892
@property

dataproc/google/cloud/dataproc_v1beta2/gapic/transports/workflow_template_service_grpc_transport.py

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

8181
@classmethod
82-
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
82+
def create_channel(
83+
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
84+
):
8385
"""Create and return a gRPC channel object.
8486
8587
Args:
@@ -89,12 +91,14 @@ def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None)
8991
credentials identify this application to the service. If
9092
none are specified, the client will attempt to ascertain
9193
the credentials from the environment.
94+
kwargs (dict): Keyword arguments, which are passed to the
95+
channel creation.
9296
9397
Returns:
9498
grpc.Channel: A gRPC channel object.
9599
"""
96100
return google.api_core.grpc_helpers.create_channel(
97-
address, credentials=credentials, scopes=cls._OAUTH_SCOPES
101+
address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs
98102
)
99103

100104
@property

dataproc/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:16:40.892640Z",
2+
"updateTime": "2019-06-18T12:15:45.480707Z",
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)