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

Commit 28f193c

Browse files
docs: Add documentation for enums (#158)
* 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 0c33ec9 commit 28f193c

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

google/cloud/network_security_v1/services/network_security/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ def sample_delete_client_tls_policy():
24752475
# Done; return the response.
24762476
return response
24772477

2478-
def __enter__(self):
2478+
def __enter__(self) -> "NetworkSecurityClient":
24792479
return self
24802480

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

google/cloud/network_security_v1/types/authorization_policy.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,18 @@ class AuthorizationPolicy(proto.Message):
7070
"""
7171

7272
class Action(proto.Enum):
73-
r"""Possible values that define what action to take."""
73+
r"""Possible values that define what action to take.
74+
75+
Values:
76+
ACTION_UNSPECIFIED (0):
77+
Default value.
78+
ALLOW (1):
79+
Grant access.
80+
DENY (2):
81+
Deny access.
82+
Deny rules should be avoided unless they are
83+
used to provide a default "deny all" fallback.
84+
"""
7485
ACTION_UNSPECIFIED = 0
7586
ALLOW = 1
7687
DENY = 2

google/cloud/network_security_v1beta1/services/network_security/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2477,7 +2477,7 @@ def sample_delete_client_tls_policy():
24772477
# Done; return the response.
24782478
return response
24792479

2480-
def __enter__(self):
2480+
def __enter__(self) -> "NetworkSecurityClient":
24812481
return self
24822482

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

google/cloud/network_security_v1beta1/types/authorization_policy.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,18 @@ class AuthorizationPolicy(proto.Message):
7070
"""
7171

7272
class Action(proto.Enum):
73-
r"""Possible values that define what action to take."""
73+
r"""Possible values that define what action to take.
74+
75+
Values:
76+
ACTION_UNSPECIFIED (0):
77+
Default value.
78+
ALLOW (1):
79+
Grant access.
80+
DENY (2):
81+
Deny access.
82+
Deny rules should be avoided unless they are
83+
used to provide a default "deny all" fallback.
84+
"""
7485
ACTION_UNSPECIFIED = 0
7586
ALLOW = 1
7687
DENY = 2

samples/generated_samples/snippet_metadata_google.cloud.networksecurity.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-network-security",
11-
"version": "0.9.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.networksecurity.v1beta1.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-network-security",
11-
"version": "0.9.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)