Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 24facad

Browse files
docs: Add documentation for enums (#149)
* 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>
1 parent 2298657 commit 24facad

File tree

4 files changed

+206
-14
lines changed

4 files changed

+206
-14
lines changed

google/cloud/deploy_v1/services/cloud_deploy/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3272,7 +3272,7 @@ def sample_get_config():
32723272
# Done; return the response.
32733273
return response
32743274

3275-
def __enter__(self):
3275+
def __enter__(self) -> "CloudDeployClient":
32763276
return self
32773277

32783278
def __exit__(self, type, value, traceback):

google/cloud/deploy_v1/types/cloud_deploy.py

Lines changed: 196 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,18 @@ class ExecutionConfig(proto.Message):
869869
"""
870870

871871
class ExecutionEnvironmentUsage(proto.Enum):
872-
r"""Possible usages of this configuration."""
872+
r"""Possible usages of this configuration.
873+
874+
Values:
875+
EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED (0):
876+
Default value. This value is unused.
877+
RENDER (1):
878+
Use for rendering.
879+
DEPLOY (2):
880+
Use for deploying and deployment hooks.
881+
VERIFY (3):
882+
Use for deployment verification.
883+
"""
873884
EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0
874885
RENDER = 1
875886
DEPLOY = 2
@@ -1409,7 +1420,20 @@ class Release(proto.Message):
14091420
"""
14101421

14111422
class RenderState(proto.Enum):
1412-
r"""Valid states of the render operation."""
1423+
r"""Valid states of the render operation.
1424+
1425+
Values:
1426+
RENDER_STATE_UNSPECIFIED (0):
1427+
The render state is unspecified.
1428+
SUCCEEDED (1):
1429+
All rendering operations have completed
1430+
successfully.
1431+
FAILED (2):
1432+
All rendering operations have completed, and
1433+
one or more have failed.
1434+
IN_PROGRESS (3):
1435+
Rendering has started and is not complete.
1436+
"""
14131437
RENDER_STATE_UNSPECIFIED = 0
14141438
SUCCEEDED = 1
14151439
FAILED = 2
@@ -1437,14 +1461,39 @@ class TargetRender(proto.Message):
14371461
"""
14381462

14391463
class TargetRenderState(proto.Enum):
1440-
r"""Valid states of the render operation."""
1464+
r"""Valid states of the render operation.
1465+
1466+
Values:
1467+
TARGET_RENDER_STATE_UNSPECIFIED (0):
1468+
The render operation state is unspecified.
1469+
SUCCEEDED (1):
1470+
The render operation has completed
1471+
successfully.
1472+
FAILED (2):
1473+
The render operation has failed.
1474+
IN_PROGRESS (3):
1475+
The render operation is in progress.
1476+
"""
14411477
TARGET_RENDER_STATE_UNSPECIFIED = 0
14421478
SUCCEEDED = 1
14431479
FAILED = 2
14441480
IN_PROGRESS = 3
14451481

14461482
class FailureCause(proto.Enum):
1447-
r"""Well-known rendering failures."""
1483+
r"""Well-known rendering failures.
1484+
1485+
Values:
1486+
FAILURE_CAUSE_UNSPECIFIED (0):
1487+
No reason for failure is specified.
1488+
CLOUD_BUILD_UNAVAILABLE (1):
1489+
Cloud Build is not available, either because it is not
1490+
enabled or because Google Cloud Deploy has insufficient
1491+
permissions. See `required
1492+
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
1493+
EXECUTION_FAILED (2):
1494+
The render operation did not complete
1495+
successfully; check Cloud Build logs.
1496+
"""
14481497
FAILURE_CAUSE_UNSPECIFIED = 0
14491498
CLOUD_BUILD_UNAVAILABLE = 1
14501499
EXECUTION_FAILED = 2
@@ -1858,15 +1907,49 @@ class Rollout(proto.Message):
18581907
"""
18591908

18601909
class ApprovalState(proto.Enum):
1861-
r"""Valid approval states of a ``Rollout``."""
1910+
r"""Valid approval states of a ``Rollout``.
1911+
1912+
Values:
1913+
APPROVAL_STATE_UNSPECIFIED (0):
1914+
The ``Rollout`` has an unspecified approval state.
1915+
NEEDS_APPROVAL (1):
1916+
The ``Rollout`` requires approval.
1917+
DOES_NOT_NEED_APPROVAL (2):
1918+
The ``Rollout`` does not require approval.
1919+
APPROVED (3):
1920+
The ``Rollout`` has been approved.
1921+
REJECTED (4):
1922+
The ``Rollout`` has been rejected.
1923+
"""
18621924
APPROVAL_STATE_UNSPECIFIED = 0
18631925
NEEDS_APPROVAL = 1
18641926
DOES_NOT_NEED_APPROVAL = 2
18651927
APPROVED = 3
18661928
REJECTED = 4
18671929

18681930
class State(proto.Enum):
1869-
r"""Valid states of a ``Rollout``."""
1931+
r"""Valid states of a ``Rollout``.
1932+
1933+
Values:
1934+
STATE_UNSPECIFIED (0):
1935+
The ``Rollout`` has an unspecified state.
1936+
SUCCEEDED (1):
1937+
The ``Rollout`` has completed successfully.
1938+
FAILED (2):
1939+
The ``Rollout`` has failed.
1940+
IN_PROGRESS (3):
1941+
The ``Rollout`` is being deployed.
1942+
PENDING_APPROVAL (4):
1943+
The ``Rollout`` needs approval.
1944+
APPROVAL_REJECTED (5):
1945+
An approver rejected the ``Rollout``.
1946+
PENDING (6):
1947+
The ``Rollout`` is waiting for an earlier Rollout(s) to
1948+
complete on this ``Target``.
1949+
PENDING_RELEASE (7):
1950+
The ``Rollout`` is waiting for the ``Release`` to be fully
1951+
rendered.
1952+
"""
18701953
STATE_UNSPECIFIED = 0
18711954
SUCCEEDED = 1
18721955
FAILED = 2
@@ -1877,7 +1960,29 @@ class State(proto.Enum):
18771960
PENDING_RELEASE = 7
18781961

18791962
class FailureCause(proto.Enum):
1880-
r"""Well-known rollout failures."""
1963+
r"""Well-known rollout failures.
1964+
1965+
Values:
1966+
FAILURE_CAUSE_UNSPECIFIED (0):
1967+
No reason for failure is specified.
1968+
CLOUD_BUILD_UNAVAILABLE (1):
1969+
Cloud Build is not available, either because it is not
1970+
enabled or because Cloud Deploy has insufficient
1971+
permissions. See `required
1972+
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
1973+
EXECUTION_FAILED (2):
1974+
The deploy operation did not complete
1975+
successfully; check Cloud Build logs.
1976+
DEADLINE_EXCEEDED (3):
1977+
Deployment did not complete within the
1978+
alloted time.
1979+
RELEASE_FAILED (4):
1980+
Release is in a failed state.
1981+
RELEASE_ABANDONED (5):
1982+
Release is abandoned.
1983+
VERIFICATION_CONFIG_NOT_FOUND (6):
1984+
No skaffold verify configuration was found.
1985+
"""
18811986
FAILURE_CAUSE_UNSPECIFIED = 0
18821987
CLOUD_BUILD_UNAVAILABLE = 1
18831988
EXECUTION_FAILED = 2
@@ -2059,7 +2164,23 @@ class Phase(proto.Message):
20592164
"""
20602165

20612166
class State(proto.Enum):
2062-
r"""Valid states of a Phase."""
2167+
r"""Valid states of a Phase.
2168+
2169+
Values:
2170+
STATE_UNSPECIFIED (0):
2171+
The Phase has an unspecified state.
2172+
PENDING (1):
2173+
The Phase is waiting for an earlier Phase(s)
2174+
to complete.
2175+
IN_PROGRESS (2):
2176+
The Phase is in progress.
2177+
SUCCEEDED (3):
2178+
The Phase has succeeded.
2179+
FAILED (4):
2180+
The Phase has failed.
2181+
ABORTED (5):
2182+
The Phase was aborted.
2183+
"""
20632184
STATE_UNSPECIFIED = 0
20642185
PENDING = 1
20652186
IN_PROGRESS = 2
@@ -2137,7 +2258,25 @@ class Job(proto.Message):
21372258
"""
21382259

21392260
class State(proto.Enum):
2140-
r"""Valid states of a Job."""
2261+
r"""Valid states of a Job.
2262+
2263+
Values:
2264+
STATE_UNSPECIFIED (0):
2265+
The Job has an unspecified state.
2266+
PENDING (1):
2267+
The Job is waiting for an earlier Phase(s) or
2268+
Job(s) to complete.
2269+
DISABLED (2):
2270+
The Job is disabled.
2271+
IN_PROGRESS (3):
2272+
The Job is in progress.
2273+
SUCCEEDED (4):
2274+
The Job succeeded.
2275+
FAILED (5):
2276+
The Job failed.
2277+
ABORTED (6):
2278+
The Job was aborted.
2279+
"""
21412280
STATE_UNSPECIFIED = 0
21422281
PENDING = 1
21432282
DISABLED = 2
@@ -2534,7 +2673,18 @@ class JobRun(proto.Message):
25342673
"""
25352674

25362675
class State(proto.Enum):
2537-
r"""Valid states of a ``JobRun``."""
2676+
r"""Valid states of a ``JobRun``.
2677+
2678+
Values:
2679+
STATE_UNSPECIFIED (0):
2680+
The ``JobRun`` has an unspecified state.
2681+
IN_PROGRESS (1):
2682+
The ``JobRun`` is in progress.
2683+
SUCCEEDED (2):
2684+
The ``JobRun`` has succeeded.
2685+
FAILED (3):
2686+
The ``JobRun`` has failed.
2687+
"""
25382688
STATE_UNSPECIFIED = 0
25392689
IN_PROGRESS = 1
25402690
SUCCEEDED = 2
@@ -2615,7 +2765,23 @@ class DeployJobRun(proto.Message):
26152765
"""
26162766

26172767
class FailureCause(proto.Enum):
2618-
r"""Well-known deploy failures."""
2768+
r"""Well-known deploy failures.
2769+
2770+
Values:
2771+
FAILURE_CAUSE_UNSPECIFIED (0):
2772+
No reason for failure is specified.
2773+
CLOUD_BUILD_UNAVAILABLE (1):
2774+
Cloud Build is not available, either because it is not
2775+
enabled or because Google Cloud Deploy has insufficient
2776+
permissions. See `Required
2777+
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
2778+
EXECUTION_FAILED (2):
2779+
The deploy operation did not complete
2780+
successfully; check Cloud Build logs.
2781+
DEADLINE_EXCEEDED (3):
2782+
The deploy build did not complete within the
2783+
alloted time.
2784+
"""
26192785
FAILURE_CAUSE_UNSPECIFIED = 0
26202786
CLOUD_BUILD_UNAVAILABLE = 1
26212787
EXECUTION_FAILED = 2
@@ -2666,7 +2832,25 @@ class VerifyJobRun(proto.Message):
26662832
"""
26672833

26682834
class FailureCause(proto.Enum):
2669-
r"""Well-known verify failures."""
2835+
r"""Well-known verify failures.
2836+
2837+
Values:
2838+
FAILURE_CAUSE_UNSPECIFIED (0):
2839+
No reason for failure is specified.
2840+
CLOUD_BUILD_UNAVAILABLE (1):
2841+
Cloud Build is not available, either because it is not
2842+
enabled or because Google Cloud Deploy has insufficient
2843+
permissions. See `required
2844+
permission </deploy/docs/cloud-deploy-service-account#required_permissions>`__.
2845+
EXECUTION_FAILED (2):
2846+
The verify operation did not complete
2847+
successfully; check Cloud Build logs.
2848+
DEADLINE_EXCEEDED (3):
2849+
The verify build did not complete within the
2850+
alloted time.
2851+
VERIFICATION_CONFIG_NOT_FOUND (4):
2852+
No Skaffold verify configuration was found.
2853+
"""
26702854
FAILURE_CAUSE_UNSPECIFIED = 0
26712855
CLOUD_BUILD_UNAVAILABLE = 1
26722856
EXECUTION_FAILED = 2

google/cloud/deploy_v1/types/log_enums.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
class Type(proto.Enum):
2929
r"""Type indicates the type of the log entry and can be used as a
3030
filter.
31+
32+
Values:
33+
TYPE_UNSPECIFIED (0):
34+
Type is unspecified.
35+
TYPE_PUBSUB_NOTIFICATION_FAILURE (1):
36+
A Pub/Sub notification failed to be sent.
37+
TYPE_RENDER_STATUES_CHANGE (2):
38+
Release render status changed notification.
3139
"""
3240
TYPE_UNSPECIFIED = 0
3341
TYPE_PUBSUB_NOTIFICATION_FAILURE = 1

samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-deploy",
11-
"version": "1.6.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)