Skip to content

Commit edcbf6f

Browse files
yoshi-automationbusunkim96
authored andcommitted
Allow kwargs to be passed to create_channel (via synth). (googleapis#8397)
1 parent 0eb1f95 commit edcbf6f

6 files changed

Lines changed: 35 additions & 10 deletions

File tree

monitoring/google/cloud/monitoring_v3/gapic/transports/alert_policy_service_grpc_transport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def __init__(
7676
}
7777

7878
@classmethod
79-
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
79+
def create_channel(
80+
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
81+
):
8082
"""Create and return a gRPC channel object.
8183
8284
Args:
@@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
8688
credentials identify this application to the service. If
8789
none are specified, the client will attempt to ascertain
8890
the credentials from the environment.
91+
kwargs (dict): Keyword arguments, which are passed to the
92+
channel creation.
8993
9094
Returns:
9195
grpc.Channel: A gRPC channel object.
@@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
98102
"grpc.max_send_message_length": -1,
99103
"grpc.max_receive_message_length": -1,
100104
}.items(),
105+
**kwargs
101106
)
102107

103108
@property

monitoring/google/cloud/monitoring_v3/gapic/transports/group_service_grpc_transport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def __init__(
7474
}
7575

7676
@classmethod
77-
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
77+
def create_channel(
78+
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
79+
):
7880
"""Create and return a gRPC channel object.
7981
8082
Args:
@@ -84,6 +86,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
8486
credentials identify this application to the service. If
8587
none are specified, the client will attempt to ascertain
8688
the credentials from the environment.
89+
kwargs (dict): Keyword arguments, which are passed to the
90+
channel creation.
8791
8892
Returns:
8993
grpc.Channel: A gRPC channel object.
@@ -96,6 +100,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
96100
"grpc.max_send_message_length": -1,
97101
"grpc.max_receive_message_length": -1,
98102
}.items(),
103+
**kwargs
99104
)
100105

101106
@property

monitoring/google/cloud/monitoring_v3/gapic/transports/metric_service_grpc_transport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def __init__(
7474
}
7575

7676
@classmethod
77-
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
77+
def create_channel(
78+
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
79+
):
7880
"""Create and return a gRPC channel object.
7981
8082
Args:
@@ -84,6 +86,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
8486
credentials identify this application to the service. If
8587
none are specified, the client will attempt to ascertain
8688
the credentials from the environment.
89+
kwargs (dict): Keyword arguments, which are passed to the
90+
channel creation.
8791
8892
Returns:
8993
grpc.Channel: A gRPC channel object.
@@ -96,6 +100,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
96100
"grpc.max_send_message_length": -1,
97101
"grpc.max_receive_message_length": -1,
98102
}.items(),
103+
**kwargs
99104
)
100105

101106
@property

monitoring/google/cloud/monitoring_v3/gapic/transports/notification_channel_service_grpc_transport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def __init__(
7676
}
7777

7878
@classmethod
79-
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
79+
def create_channel(
80+
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
81+
):
8082
"""Create and return a gRPC channel object.
8183
8284
Args:
@@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
8688
credentials identify this application to the service. If
8789
none are specified, the client will attempt to ascertain
8890
the credentials from the environment.
91+
kwargs (dict): Keyword arguments, which are passed to the
92+
channel creation.
8993
9094
Returns:
9195
grpc.Channel: A gRPC channel object.
@@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
98102
"grpc.max_send_message_length": -1,
99103
"grpc.max_receive_message_length": -1,
100104
}.items(),
105+
**kwargs
101106
)
102107

103108
@property

monitoring/google/cloud/monitoring_v3/gapic/transports/uptime_check_service_grpc_transport.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def __init__(
7676
}
7777

7878
@classmethod
79-
def create_channel(cls, address="monitoring.googleapis.com:443", credentials=None):
79+
def create_channel(
80+
cls, address="monitoring.googleapis.com:443", credentials=None, **kwargs
81+
):
8082
"""Create and return a gRPC channel object.
8183
8284
Args:
@@ -86,6 +88,8 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
8688
credentials identify this application to the service. If
8789
none are specified, the client will attempt to ascertain
8890
the credentials from the environment.
91+
kwargs (dict): Keyword arguments, which are passed to the
92+
channel creation.
8993
9094
Returns:
9195
grpc.Channel: A gRPC channel object.
@@ -98,6 +102,7 @@ def create_channel(cls, address="monitoring.googleapis.com:443", credentials=Non
98102
"grpc.max_send_message_length": -1,
99103
"grpc.max_receive_message_length": -1,
100104
}.items(),
105+
**kwargs
101106
)
102107

103108
@property

monitoring/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:24:02.145928Z",
2+
"updateTime": "2019-06-18T12:23:03.583307Z",
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)