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

docs: Add documentation for enums #476

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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