Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.65.1 (#377)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 441524537

Source-Link: googleapis/googleapis@2a27391

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9

docs: fix type in docstring for map fields
  • Loading branch information
gcf-owl-bot[bot] authored Apr 14, 2022
1 parent fd1771b commit 3b845d6
Show file tree
Hide file tree
Showing 14 changed files with 1,872 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -564,7 +564,6 @@ async def get_supported_languages(
r"""Returns a list of supported languages for
translation.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -799,7 +798,6 @@ async def batch_translate_text(
use google.longrunning.Operation.name to poll the status
of the call.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -911,7 +909,6 @@ async def batch_translate_document(
google.longrunning.Operation.name to poll the status of
the call.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1100,7 +1097,6 @@ async def create_glossary(
r"""Creates a glossary and returns the long-running operation.
Returns NOT_FOUND, if the project doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1220,7 +1216,6 @@ async def list_glossaries(
r"""Lists glossaries in a project. Returns NOT_FOUND, if the project
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1339,7 +1334,6 @@ async def get_glossary(
r"""Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1446,7 +1440,6 @@ async def delete_glossary(
glossary isn't created yet. Returns NOT_FOUND, if the glossary
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -787,7 +787,6 @@ def get_supported_languages(
r"""Returns a list of supported languages for
translation.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1013,7 +1012,6 @@ def batch_translate_text(
use google.longrunning.Operation.name to poll the status
of the call.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1126,7 +1124,6 @@ def batch_translate_document(
google.longrunning.Operation.name to poll the status of
the call.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1315,7 +1312,6 @@ def create_glossary(
r"""Creates a glossary and returns the long-running operation.
Returns NOT_FOUND, if the project doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1435,7 +1431,6 @@ def list_glossaries(
r"""Lists glossaries in a project. Returns NOT_FOUND, if the project
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1544,7 +1539,6 @@ def get_glossary(
r"""Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down Expand Up @@ -1641,7 +1635,6 @@ def delete_glossary(
glossary isn't created yet. Returns NOT_FOUND, if the glossary
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -336,5 +337,9 @@ def delete_glossary(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("TranslationServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -554,5 +554,9 @@ def delete_glossary(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("TranslationServiceGrpcTransport",)
18 changes: 9 additions & 9 deletions google/cloud/translate_v3/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class TranslateTextRequest(proto.Message):
within the same region (have the same location-id) as the
model, otherwise an INVALID_ARGUMENT (400) error is
returned.
labels (Sequence[google.cloud.translate_v3.types.TranslateTextRequest.LabelsEntry]):
labels (Mapping[str, str]):
Optional. The labels with user-defined
metadata for the request.
Label keys and values can be no longer than 63
Expand Down Expand Up @@ -320,7 +320,7 @@ class DetectLanguageRequest(proto.Message):
Optional. The format of the source text, for
example, "text/html", "text/plain". If left
blank, the MIME type defaults to "text/html".
labels (Sequence[google.cloud.translate_v3.types.DetectLanguageRequest.LabelsEntry]):
labels (Mapping[str, str]):
Optional. The labels with user-defined
metadata for the request.
Label keys and values can be no longer than 63
Expand Down Expand Up @@ -881,7 +881,7 @@ class TranslateDocumentRequest(proto.Message):
within the same region (have the same location-id) as the
model, otherwise an INVALID_ARGUMENT (400) error is
returned.
labels (Sequence[google.cloud.translate_v3.types.TranslateDocumentRequest.LabelsEntry]):
labels (Mapping[str, str]):
Optional. The labels with user-defined
metadata for the request.
Label keys and values can be no longer than 63
Expand Down Expand Up @@ -1035,7 +1035,7 @@ class BatchTranslateTextRequest(proto.Message):
target_language_codes (Sequence[str]):
Required. Specify up to 10 language codes
here.
models (Sequence[google.cloud.translate_v3.types.BatchTranslateTextRequest.ModelsEntry]):
models (Mapping[str, str]):
Optional. The models to use for translation. Map's key is
target language code. Map's value is model name. Value can
be a built-in general model, or an AutoML Translation model.
Expand All @@ -1061,10 +1061,10 @@ class BatchTranslateTextRequest(proto.Message):
If 2 input configs match to the same file (that
is, same input path), we don't generate output
for duplicate inputs.
glossaries (Sequence[google.cloud.translate_v3.types.BatchTranslateTextRequest.GlossariesEntry]):
glossaries (Mapping[str, google.cloud.translate_v3.types.TranslateTextGlossaryConfig]):
Optional. Glossaries to be applied for
translation. It's keyed by target language code.
labels (Sequence[google.cloud.translate_v3.types.BatchTranslateTextRequest.LabelsEntry]):
labels (Mapping[str, str]):
Optional. The labels with user-defined
metadata for the request.
Label keys and values can be no longer than 63
Expand Down Expand Up @@ -1676,7 +1676,7 @@ class BatchTranslateDocumentRequest(proto.Message):
If 2 input configs match to the same file (that
is, same input path), we don't generate output
for duplicate inputs.
models (Sequence[google.cloud.translate_v3.types.BatchTranslateDocumentRequest.ModelsEntry]):
models (Mapping[str, str]):
Optional. The models to use for translation. Map's key is
target language code. Map's value is the model name. Value
can be a built-in general model, or an AutoML Translation
Expand All @@ -1692,10 +1692,10 @@ class BatchTranslateDocumentRequest(proto.Message):
If the map is empty or a specific model is not requested for
a language pair, then default google model (nmt) is used.
glossaries (Sequence[google.cloud.translate_v3.types.BatchTranslateDocumentRequest.GlossariesEntry]):
glossaries (Mapping[str, google.cloud.translate_v3.types.TranslateTextGlossaryConfig]):
Optional. Glossaries to be applied. It's
keyed by target language code.
format_conversions (Sequence[google.cloud.translate_v3.types.BatchTranslateDocumentRequest.FormatConversionsEntry]):
format_conversions (Mapping[str, str]):
Optional. File format conversion map to be applied to all
input files. Map's key is the original mime_type. Map's
value is the target mime_type of translated documents.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -431,7 +431,6 @@ async def get_supported_languages(
r"""Returns a list of supported languages for
translation.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -666,7 +665,6 @@ async def batch_translate_text(
use google.longrunning.Operation.name to poll the status
of the call.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -778,7 +776,6 @@ async def batch_translate_document(
google.longrunning.Operation.name to poll the status of
the call.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -967,7 +964,6 @@ async def create_glossary(
r"""Creates a glossary and returns the long-running operation.
Returns NOT_FOUND, if the project doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1088,7 +1084,6 @@ async def list_glossaries(
r"""Lists glossaries in a project. Returns NOT_FOUND, if the project
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1243,7 +1238,6 @@ async def get_glossary(
r"""Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1350,7 +1344,6 @@ async def delete_glossary(
glossary isn't created yet. Returns NOT_FOUND, if the glossary
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -655,7 +655,6 @@ def get_supported_languages(
r"""Returns a list of supported languages for
translation.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -881,7 +880,6 @@ def batch_translate_text(
use google.longrunning.Operation.name to poll the status
of the call.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -994,7 +992,6 @@ def batch_translate_document(
google.longrunning.Operation.name to poll the status of
the call.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1183,7 +1180,6 @@ def create_glossary(
r"""Creates a glossary and returns the long-running operation.
Returns NOT_FOUND, if the project doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1304,7 +1300,6 @@ def list_glossaries(
r"""Lists glossaries in a project. Returns NOT_FOUND, if the project
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1449,7 +1444,6 @@ def get_glossary(
r"""Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down Expand Up @@ -1546,7 +1540,6 @@ def delete_glossary(
glossary isn't created yet. Returns NOT_FOUND, if the glossary
doesn't exist.
.. code-block:: python
from google.cloud import translate_v3beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -336,5 +337,9 @@ def delete_glossary(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("TranslationServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -554,5 +554,9 @@ def delete_glossary(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("TranslationServiceGrpcTransport",)
Loading

0 comments on commit 3b845d6

Please sign in to comment.