Skip to content

Commit

Permalink
Remove send/recv msg size limit (via synth). (#8974)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and tseaver committed Aug 6, 2019
1 parent 8c651d5 commit 16b483e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ def translate_text(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -380,8 +380,8 @@ def detect_language(
mime_type (str): Optional. The format of the source text, for example, "text/html",
"text/plain". If left blank, the MIME type defaults to "text/html".
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -478,8 +478,8 @@ def get_supported_languages(
Returns languages supported by the specified model. If missing, we get
supported languages of Google general base (PBMT) model.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -623,8 +623,8 @@ def batch_translate_text(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -724,8 +724,8 @@ def create_glossary(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.translate_v3beta1.types.Glossary`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -822,8 +822,8 @@ def list_glossaries(
Filtering is not supported yet, and the parameter currently has no effect.
If missing, no filtering is performed.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -907,8 +907,8 @@ def get_glossary(
Args:
name (str): Required. The name of the glossary to retrieve.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down Expand Up @@ -986,8 +986,8 @@ def delete_glossary(
Args:
name (str): Required. The name of the glossary to delete.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ def __init__(

# Create the channel.
if channel is None:
channel = self.create_channel(address=address, credentials=credentials)
channel = self.create_channel(
address=address,
credentials=credentials,
options={
"grpc.max_send_message_length": -1,
"grpc.max_receive_message_length": -1,
}.items(),
)

self._channel = channel

Expand Down
10 changes: 5 additions & 5 deletions translate/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-07-03T12:43:20.608285Z",
"updateTime": "2019-08-06T12:45:19.878568Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.29.3",
"dockerImage": "googleapis/artman@sha256:8900f94a81adaab0238965aa8a7b3648791f4f3a95ee65adc6a56cfcc3753101"
"version": "0.32.1",
"dockerImage": "googleapis/artman@sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "69916b6ffbb7717fa009033351777d0c9909fb79",
"internalRef": "256241904"
"sha": "e699b0cba64ffddfae39633417180f1f65875896",
"internalRef": "261759677"
}
},
{
Expand Down

0 comments on commit 16b483e

Please sign in to comment.