-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(translate): generate v3 (#9020)
- Loading branch information
1 parent
7924508
commit 12a7f30
Showing
21 changed files
with
6,954 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Client for Cloud Translation API | ||
================================ | ||
|
||
.. automodule:: google.cloud.translate_v3 | ||
:members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Types for Cloud Translation API Client | ||
====================================== | ||
|
||
.. automodule:: google.cloud.translate_v3.types | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
v2 | ||
=== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
v3 | ||
=== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
gapic/v3/api | ||
gapic/v3/types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
v3beta1 | ||
======= | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
gapic/v3beta1/api | ||
gapic/v3beta1/types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
from __future__ import absolute_import | ||
|
||
from google.cloud.translate_v3 import types | ||
from google.cloud.translate_v3.gapic import enums | ||
from google.cloud.translate_v3.gapic import translation_service_client | ||
|
||
|
||
class TranslationServiceClient(translation_service_client.TranslationServiceClient): | ||
__doc__ = translation_service_client.TranslationServiceClient.__doc__ | ||
enums = enums | ||
|
||
|
||
__all__ = ("enums", "types", "TranslationServiceClient") |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright 2019 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Wrappers for protocol buffer enum types.""" | ||
|
||
import enum | ||
|
||
|
||
class BatchTranslateMetadata(object): | ||
class State(enum.IntEnum): | ||
""" | ||
State of the job. | ||
Attributes: | ||
STATE_UNSPECIFIED (int): Invalid. | ||
RUNNING (int): Request is being processed. | ||
SUCCEEDED (int): The batch is processed, and at least one item was successfully | ||
processed. | ||
FAILED (int): The batch is done and no item was successfully processed. | ||
CANCELLING (int): Request is in the process of being canceled after caller invoked | ||
longrunning.Operations.CancelOperation on the request id. | ||
CANCELLED (int): The batch is done after the user has called the | ||
longrunning.Operations.CancelOperation. Any records processed before the | ||
cancel command are output as specified in the request. | ||
""" | ||
|
||
STATE_UNSPECIFIED = 0 | ||
RUNNING = 1 | ||
SUCCEEDED = 2 | ||
FAILED = 3 | ||
CANCELLING = 4 | ||
CANCELLED = 5 | ||
|
||
|
||
class CreateGlossaryMetadata(object): | ||
class State(enum.IntEnum): | ||
""" | ||
Enumerates the possible states that the creation request can be in. | ||
Attributes: | ||
STATE_UNSPECIFIED (int): Invalid. | ||
RUNNING (int): Request is being processed. | ||
SUCCEEDED (int): The glossary was successfully created. | ||
FAILED (int): Failed to create the glossary. | ||
CANCELLING (int): Request is in the process of being canceled after caller invoked | ||
longrunning.Operations.CancelOperation on the request id. | ||
CANCELLED (int): The glossary creation request was successfully canceled. | ||
""" | ||
|
||
STATE_UNSPECIFIED = 0 | ||
RUNNING = 1 | ||
SUCCEEDED = 2 | ||
FAILED = 3 | ||
CANCELLING = 4 | ||
CANCELLED = 5 | ||
|
||
|
||
class DeleteGlossaryMetadata(object): | ||
class State(enum.IntEnum): | ||
""" | ||
Enumerates the possible states that the creation request can be in. | ||
Attributes: | ||
STATE_UNSPECIFIED (int): Invalid. | ||
RUNNING (int): Request is being processed. | ||
SUCCEEDED (int): The glossary was successfully deleted. | ||
FAILED (int): Failed to delete the glossary. | ||
CANCELLING (int): Request is in the process of being canceled after caller invoked | ||
longrunning.Operations.CancelOperation on the request id. | ||
CANCELLED (int): The glossary deletion request was successfully canceled. | ||
""" | ||
|
||
STATE_UNSPECIFIED = 0 | ||
RUNNING = 1 | ||
SUCCEEDED = 2 | ||
FAILED = 3 | ||
CANCELLING = 4 | ||
CANCELLED = 5 |
Oops, something went wrong.