Skip to content

Commit

Permalink
Generate v3
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Aug 12, 2019
1 parent bfb4da8 commit 7c4f5e3
Show file tree
Hide file tree
Showing 18 changed files with 6,933 additions and 13 deletions.
6 changes: 6 additions & 0 deletions translate/docs/gapic/v3/api.rst
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:
5 changes: 5 additions & 0 deletions translate/docs/gapic/v3/types.rst
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:
11 changes: 10 additions & 1 deletion translate/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ Detailed Usage Guide
API Reference
-------------

A new beta release, spelled ``v3beta1``, is provided to provide for preview

An API and type reference is provided for v3:

.. toctree::
:maxdepth: 2

gapic/v3/api
gapic/v3/types

A beta release, spelled ``v3beta1``, is provided to provide for preview
of upcoming features. In order to use this, you will want to import from
``google.cloud.translate_v3beta1`` in lieu of ``google.cloud.translate``.

Expand Down
30 changes: 30 additions & 0 deletions translate/google/cloud/translate_v3/__init__.py
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.
91 changes: 91 additions & 0 deletions translate/google/cloud/translate_v3/gapic/enums.py
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

0 comments on commit 7c4f5e3

Please sign in to comment.