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

Commit

Permalink
docs: Add documentation for enums (#476)
Browse files Browse the repository at this point in the history
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 23, 2023
1 parent 409ad1c commit e20fa00
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ def sample_delete_glossary():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "TranslationServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
86 changes: 84 additions & 2 deletions google/cloud/translate_v3/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,30 @@ class BatchTranslateMetadata(proto.Message):
"""

class State(proto.Enum):
r"""State of the job."""
r"""State of the job.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The batch is processed, and at least one item
was successfully processed.
FAILED (3):
The batch is done and no item was
successfully processed.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
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
Expand Down Expand Up @@ -1540,6 +1563,24 @@ class CreateGlossaryMetadata(proto.Message):
class State(proto.Enum):
r"""Enumerates the possible states that the creation request can
be in.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The glossary was successfully created.
FAILED (3):
Failed to create the glossary.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
The glossary creation request was
successfully canceled.
"""
STATE_UNSPECIFIED = 0
RUNNING = 1
Expand Down Expand Up @@ -1584,6 +1625,24 @@ class DeleteGlossaryMetadata(proto.Message):
class State(proto.Enum):
r"""Enumerates the possible states that the creation request can
be in.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The glossary was successfully deleted.
FAILED (3):
Failed to delete the glossary.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
The glossary deletion request was
successfully canceled.
"""
STATE_UNSPECIFIED = 0
RUNNING = 1
Expand Down Expand Up @@ -1989,7 +2048,30 @@ class BatchTranslateDocumentMetadata(proto.Message):
"""

class State(proto.Enum):
r"""State of the job."""
r"""State of the job.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The batch is processed, and at least one item
was successfully processed.
FAILED (3):
The batch is done and no item was
successfully processed.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ def sample_delete_glossary():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "TranslationServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
86 changes: 84 additions & 2 deletions google/cloud/translate_v3beta1/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,30 @@ class BatchTranslateMetadata(proto.Message):
"""

class State(proto.Enum):
r"""State of the job."""
r"""State of the job.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The batch is processed, and at least one item
was successfully processed.
FAILED (3):
The batch is done and no item was
successfully processed.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
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
Expand Down Expand Up @@ -1531,6 +1554,24 @@ class CreateGlossaryMetadata(proto.Message):
class State(proto.Enum):
r"""Enumerates the possible states that the creation request can
be in.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The glossary was successfully created.
FAILED (3):
Failed to create the glossary.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
The glossary creation request was
successfully canceled.
"""
STATE_UNSPECIFIED = 0
RUNNING = 1
Expand Down Expand Up @@ -1575,6 +1616,24 @@ class DeleteGlossaryMetadata(proto.Message):
class State(proto.Enum):
r"""Enumerates the possible states that the creation request can
be in.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The glossary was successfully deleted.
FAILED (3):
Failed to delete the glossary.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
The glossary deletion request was
successfully canceled.
"""
STATE_UNSPECIFIED = 0
RUNNING = 1
Expand Down Expand Up @@ -1980,7 +2039,30 @@ class BatchTranslateDocumentMetadata(proto.Message):
"""

class State(proto.Enum):
r"""State of the job."""
r"""State of the job.
Values:
STATE_UNSPECIFIED (0):
Invalid.
RUNNING (1):
Request is being processed.
SUCCEEDED (2):
The batch is processed, and at least one item
was successfully processed.
FAILED (3):
The batch is done and no item was
successfully processed.
CANCELLING (4):
Request is in the process of being canceled
after caller invoked
longrunning.Operations.CancelOperation on the
request id.
CANCELLED (5):
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
Expand Down

0 comments on commit e20fa00

Please sign in to comment.