Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataproc: Allow kwargs to be passed to create_channel (via synth). #8387

Merged
merged 1 commit into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def __init__(
)

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -87,12 +89,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def __init__(
self._stubs = {"job_controller_stub": jobs_pb2_grpc.JobControllerStub(channel)}

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -77,12 +79,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def __init__(
)

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -89,12 +91,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def __init__(
}

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -81,12 +83,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def __init__(
)

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -87,12 +89,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def __init__(
self._stubs = {"job_controller_stub": jobs_pb2_grpc.JobControllerStub(channel)}

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -77,12 +79,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def __init__(
)

@classmethod
def create_channel(cls, address="dataproc.googleapis.com:443", credentials=None):
def create_channel(
cls, address="dataproc.googleapis.com:443", credentials=None, **kwargs
):
"""Create and return a gRPC channel object.

Args:
Expand All @@ -89,12 +91,14 @@ def create_channel(cls, address="dataproc.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
Expand Down
10 changes: 5 additions & 5 deletions dataproc/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-15T12:16:40.892640Z",
"updateTime": "2019-06-18T12:15:45.480707Z",
"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"
}
},
{
Expand Down