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

Commit

Permalink
docs: Add documentation for enums (#225)
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 20, 2023
1 parent 0aa4362 commit e26302e
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ def sample_delete_spoke():
# Done; return the response.
return response

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

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

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

def __exit__(self, type, value, traceback):
Expand Down
29 changes: 28 additions & 1 deletion google/cloud/networkconnectivity_v1/types/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,19 @@


class LocationFeature(proto.Enum):
r"""Supported features for a location"""
r"""Supported features for a location
Values:
LOCATION_FEATURE_UNSPECIFIED (0):
No publicly supported feature in this
location
SITE_TO_CLOUD_SPOKES (1):
Site-to-cloud spokes are supported in this
location
SITE_TO_SITE_SPOKES (2):
Site-to-site spokes are supported in this
location
"""
LOCATION_FEATURE_UNSPECIFIED = 0
SITE_TO_CLOUD_SPOKES = 1
SITE_TO_SITE_SPOKES = 2
Expand All @@ -58,6 +70,21 @@ class LocationFeature(proto.Enum):
class State(proto.Enum):
r"""The State enum represents the lifecycle stage of a Network
Connectivity Center resource.
Values:
STATE_UNSPECIFIED (0):
No state information available
CREATING (1):
The resource's create operation is in
progress
ACTIVE (2):
The resource is active
DELETING (3):
The resource's Delete operation is in
progress
UPDATING (6):
The resource's Update operation is in
progress
"""
STATE_UNSPECIFIED = 0
CREATING = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,15 @@ class Filter(proto.Message):
"""

class ProtocolVersion(proto.Enum):
r"""The internet protocol version."""
r"""The internet protocol version.
Values:
PROTOCOL_VERSION_UNSPECIFIED (0):
Default value.
IPV4 (1):
The PBR is for IPv4 internet protocol
traffic.
"""
PROTOCOL_VERSION_UNSPECIFIED = 0
IPV4 = 1

Expand Down Expand Up @@ -208,6 +216,18 @@ class Warnings(proto.Message):
class Code(proto.Enum):
r"""Warning code for Policy Based Routing. Expect to add values
in the future.
Values:
WARNING_UNSPECIFIED (0):
Default value.
RESOURCE_NOT_ACTIVE (1):
The policy based route is not active and
functioning. Common causes are the dependent
network was deleted or the resource project was
turned off.
RESOURCE_BEING_MODIFIED (2):
The policy based route is being modified
(e.g. created/deleted) at this time.
"""
WARNING_UNSPECIFIED = 0
RESOURCE_NOT_ACTIVE = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ def sample_delete_spoke():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
12 changes: 12 additions & 0 deletions google/cloud/networkconnectivity_v1alpha1/types/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@
class State(proto.Enum):
r"""The State enum represents the lifecycle of a Network
Connectivity Center resource.
Values:
STATE_UNSPECIFIED (0):
No state information available
CREATING (1):
The resource's create operation is in
progress
ACTIVE (2):
The resource is active
DELETING (3):
The resource's Delete operation is in
progress
"""
STATE_UNSPECIFIED = 0
CREATING = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-network-connectivity",
"version": "1.6.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-network-connectivity",
"version": "1.6.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit e26302e

Please sign in to comment.