Skip to content

Commit

Permalink
docs: Add documentation for enums (#149)
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: googleapis/googleapis-gen@0080f83
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 20, 2023
1 parent 34a3f51 commit 00403ad
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3272,7 +3272,7 @@ def sample_get_config():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,18 @@ class ExecutionConfig(proto.Message):
"""

class ExecutionEnvironmentUsage(proto.Enum):
r"""Possible usages of this configuration."""
r"""Possible usages of this configuration.
Values:
EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED (0):
Default value. This value is unused.
RENDER (1):
Use for rendering.
DEPLOY (2):
Use for deploying and deployment hooks.
VERIFY (3):
Use for deployment verification.
"""
EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0
RENDER = 1
DEPLOY = 2
Expand Down Expand Up @@ -1409,7 +1420,20 @@ class Release(proto.Message):
"""

class RenderState(proto.Enum):
r"""Valid states of the render operation."""
r"""Valid states of the render operation.
Values:
RENDER_STATE_UNSPECIFIED (0):
The render state is unspecified.
SUCCEEDED (1):
All rendering operations have completed
successfully.
FAILED (2):
All rendering operations have completed, and
one or more have failed.
IN_PROGRESS (3):
Rendering has started and is not complete.
"""
RENDER_STATE_UNSPECIFIED = 0
SUCCEEDED = 1
FAILED = 2
Expand Down Expand Up @@ -1437,14 +1461,39 @@ class TargetRender(proto.Message):
"""

class TargetRenderState(proto.Enum):
r"""Valid states of the render operation."""
r"""Valid states of the render operation.
Values:
TARGET_RENDER_STATE_UNSPECIFIED (0):
The render operation state is unspecified.
SUCCEEDED (1):
The render operation has completed
successfully.
FAILED (2):
The render operation has failed.
IN_PROGRESS (3):
The render operation is in progress.
"""
TARGET_RENDER_STATE_UNSPECIFIED = 0
SUCCEEDED = 1
FAILED = 2
IN_PROGRESS = 3

class FailureCause(proto.Enum):
r"""Well-known rendering failures."""
r"""Well-known rendering failures.
Values:
FAILURE_CAUSE_UNSPECIFIED (0):
No reason for failure is specified.
CLOUD_BUILD_UNAVAILABLE (1):
Cloud Build is not available, either because it is not
enabled or because Google Cloud Deploy has insufficient
permissions. See `required
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
EXECUTION_FAILED (2):
The render operation did not complete
successfully; check Cloud Build logs.
"""
FAILURE_CAUSE_UNSPECIFIED = 0
CLOUD_BUILD_UNAVAILABLE = 1
EXECUTION_FAILED = 2
Expand Down Expand Up @@ -1858,15 +1907,49 @@ class Rollout(proto.Message):
"""

class ApprovalState(proto.Enum):
r"""Valid approval states of a ``Rollout``."""
r"""Valid approval states of a ``Rollout``.
Values:
APPROVAL_STATE_UNSPECIFIED (0):
The ``Rollout`` has an unspecified approval state.
NEEDS_APPROVAL (1):
The ``Rollout`` requires approval.
DOES_NOT_NEED_APPROVAL (2):
The ``Rollout`` does not require approval.
APPROVED (3):
The ``Rollout`` has been approved.
REJECTED (4):
The ``Rollout`` has been rejected.
"""
APPROVAL_STATE_UNSPECIFIED = 0
NEEDS_APPROVAL = 1
DOES_NOT_NEED_APPROVAL = 2
APPROVED = 3
REJECTED = 4

class State(proto.Enum):
r"""Valid states of a ``Rollout``."""
r"""Valid states of a ``Rollout``.
Values:
STATE_UNSPECIFIED (0):
The ``Rollout`` has an unspecified state.
SUCCEEDED (1):
The ``Rollout`` has completed successfully.
FAILED (2):
The ``Rollout`` has failed.
IN_PROGRESS (3):
The ``Rollout`` is being deployed.
PENDING_APPROVAL (4):
The ``Rollout`` needs approval.
APPROVAL_REJECTED (5):
An approver rejected the ``Rollout``.
PENDING (6):
The ``Rollout`` is waiting for an earlier Rollout(s) to
complete on this ``Target``.
PENDING_RELEASE (7):
The ``Rollout`` is waiting for the ``Release`` to be fully
rendered.
"""
STATE_UNSPECIFIED = 0
SUCCEEDED = 1
FAILED = 2
Expand All @@ -1877,7 +1960,29 @@ class State(proto.Enum):
PENDING_RELEASE = 7

class FailureCause(proto.Enum):
r"""Well-known rollout failures."""
r"""Well-known rollout failures.
Values:
FAILURE_CAUSE_UNSPECIFIED (0):
No reason for failure is specified.
CLOUD_BUILD_UNAVAILABLE (1):
Cloud Build is not available, either because it is not
enabled or because Cloud Deploy has insufficient
permissions. See `required
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
EXECUTION_FAILED (2):
The deploy operation did not complete
successfully; check Cloud Build logs.
DEADLINE_EXCEEDED (3):
Deployment did not complete within the
alloted time.
RELEASE_FAILED (4):
Release is in a failed state.
RELEASE_ABANDONED (5):
Release is abandoned.
VERIFICATION_CONFIG_NOT_FOUND (6):
No skaffold verify configuration was found.
"""
FAILURE_CAUSE_UNSPECIFIED = 0
CLOUD_BUILD_UNAVAILABLE = 1
EXECUTION_FAILED = 2
Expand Down Expand Up @@ -2059,7 +2164,23 @@ class Phase(proto.Message):
"""

class State(proto.Enum):
r"""Valid states of a Phase."""
r"""Valid states of a Phase.
Values:
STATE_UNSPECIFIED (0):
The Phase has an unspecified state.
PENDING (1):
The Phase is waiting for an earlier Phase(s)
to complete.
IN_PROGRESS (2):
The Phase is in progress.
SUCCEEDED (3):
The Phase has succeeded.
FAILED (4):
The Phase has failed.
ABORTED (5):
The Phase was aborted.
"""
STATE_UNSPECIFIED = 0
PENDING = 1
IN_PROGRESS = 2
Expand Down Expand Up @@ -2137,7 +2258,25 @@ class Job(proto.Message):
"""

class State(proto.Enum):
r"""Valid states of a Job."""
r"""Valid states of a Job.
Values:
STATE_UNSPECIFIED (0):
The Job has an unspecified state.
PENDING (1):
The Job is waiting for an earlier Phase(s) or
Job(s) to complete.
DISABLED (2):
The Job is disabled.
IN_PROGRESS (3):
The Job is in progress.
SUCCEEDED (4):
The Job succeeded.
FAILED (5):
The Job failed.
ABORTED (6):
The Job was aborted.
"""
STATE_UNSPECIFIED = 0
PENDING = 1
DISABLED = 2
Expand Down Expand Up @@ -2534,7 +2673,18 @@ class JobRun(proto.Message):
"""

class State(proto.Enum):
r"""Valid states of a ``JobRun``."""
r"""Valid states of a ``JobRun``.
Values:
STATE_UNSPECIFIED (0):
The ``JobRun`` has an unspecified state.
IN_PROGRESS (1):
The ``JobRun`` is in progress.
SUCCEEDED (2):
The ``JobRun`` has succeeded.
FAILED (3):
The ``JobRun`` has failed.
"""
STATE_UNSPECIFIED = 0
IN_PROGRESS = 1
SUCCEEDED = 2
Expand Down Expand Up @@ -2615,7 +2765,23 @@ class DeployJobRun(proto.Message):
"""

class FailureCause(proto.Enum):
r"""Well-known deploy failures."""
r"""Well-known deploy failures.
Values:
FAILURE_CAUSE_UNSPECIFIED (0):
No reason for failure is specified.
CLOUD_BUILD_UNAVAILABLE (1):
Cloud Build is not available, either because it is not
enabled or because Google Cloud Deploy has insufficient
permissions. See `Required
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
EXECUTION_FAILED (2):
The deploy operation did not complete
successfully; check Cloud Build logs.
DEADLINE_EXCEEDED (3):
The deploy build did not complete within the
alloted time.
"""
FAILURE_CAUSE_UNSPECIFIED = 0
CLOUD_BUILD_UNAVAILABLE = 1
EXECUTION_FAILED = 2
Expand Down Expand Up @@ -2666,7 +2832,25 @@ class VerifyJobRun(proto.Message):
"""

class FailureCause(proto.Enum):
r"""Well-known verify failures."""
r"""Well-known verify failures.
Values:
FAILURE_CAUSE_UNSPECIFIED (0):
No reason for failure is specified.
CLOUD_BUILD_UNAVAILABLE (1):
Cloud Build is not available, either because it is not
enabled or because Google Cloud Deploy has insufficient
permissions. See `required
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
EXECUTION_FAILED (2):
The verify operation did not complete
successfully; check Cloud Build logs.
DEADLINE_EXCEEDED (3):
The verify build did not complete within the
alloted time.
VERIFICATION_CONFIG_NOT_FOUND (4):
No Skaffold verify configuration was found.
"""
FAILURE_CAUSE_UNSPECIFIED = 0
CLOUD_BUILD_UNAVAILABLE = 1
EXECUTION_FAILED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
class Type(proto.Enum):
r"""Type indicates the type of the log entry and can be used as a
filter.
Values:
TYPE_UNSPECIFIED (0):
Type is unspecified.
TYPE_PUBSUB_NOTIFICATION_FAILURE (1):
A Pub/Sub notification failed to be sent.
TYPE_RENDER_STATUES_CHANGE (2):
Release render status changed notification.
"""
TYPE_UNSPECIFIED = 0
TYPE_PUBSUB_NOTIFICATION_FAILURE = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-deploy",
"version": "1.6.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 00403ad

Please sign in to comment.