Skip to content

Commit

Permalink
docs: Add documentation for enums (#252)
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] committed Jan 20, 2023
1 parent 321a8c3 commit 44941e1
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def sample_delete_tag_binding():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

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

class State(proto.Enum):
r"""Folder lifecycle states."""
r"""Folder lifecycle states.
Values:
STATE_UNSPECIFIED (0):
Unspecified state.
ACTIVE (1):
The normal and active state.
DELETE_REQUESTED (2):
The folder has been marked for deletion by
the user.
"""
STATE_UNSPECIFIED = 0
ACTIVE = 1
DELETE_REQUESTED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,18 @@ class Organization(proto.Message):
"""

class State(proto.Enum):
r"""Organization lifecycle states."""
r"""Organization lifecycle states.
Values:
STATE_UNSPECIFIED (0):
Unspecified state. This is only useful for
distinguishing unset values.
ACTIVE (1):
The normal and active state.
DELETE_REQUESTED (2):
The organization has been marked for deletion
by the user.
"""
STATE_UNSPECIFIED = 0
ACTIVE = 1
DELETE_REQUESTED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,22 @@ class Project(proto.Message):
"""

class State(proto.Enum):
r"""Project lifecycle states."""
r"""Project lifecycle states.
Values:
STATE_UNSPECIFIED (0):
Unspecified state. This is only used/useful
for distinguishing unset values.
ACTIVE (1):
The normal and active state.
DELETE_REQUESTED (2):
The project has been marked for deletion by the user (by
invoking
[DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject])
or by the system (Google Cloud Platform). This can generally
be reversed by invoking [UndeleteProject]
[google.cloud.resourcemanager.v3.Projects.UndeleteProject].
"""
STATE_UNSPECIFIED = 0
ACTIVE = 1
DELETE_REQUESTED = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-resource-manager",
"version": "1.8.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 44941e1

Please sign in to comment.