Skip to content

Commit

Permalink
docs: Add documentation for enums (#63)
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 9ed469f commit c8b5638
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5587,7 +5587,7 @@ def sample_delete_mesh():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ class MetadataLabelMatcher(proto.Message):
class MetadataLabelMatchCriteria(proto.Enum):
r"""Possible criteria values that define logic of how matching is
made.
Values:
METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED (0):
Default value. Should not be used.
MATCH_ANY (1):
At least one of the Labels specified in the
matcher should match the metadata presented by
xDS client.
MATCH_ALL (2):
The metadata presented by the xDS client
should contain all of the labels specified here.
"""
METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0
MATCH_ANY = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,16 @@ class EndpointPolicy(proto.Message):
"""

class EndpointPolicyType(proto.Enum):
r"""The type of endpoint policy."""
r"""The type of endpoint policy.
Values:
ENDPOINT_POLICY_TYPE_UNSPECIFIED (0):
Default value. Must not be used.
SIDECAR_PROXY (1):
Represents a proxy deployed as a sidecar.
GRPC_SERVER (2):
Represents a proxyless gRPC backend.
"""
ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0
SIDECAR_PROXY = 1
GRPC_SERVER = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ class Type(proto.Enum):
- OPEN_MESH
- SECURE_WEB_GATEWAY
Values:
TYPE_UNSPECIFIED (0):
The type of the customer managed gateway is
unspecified.
OPEN_MESH (1):
The type of the customer managed gateway is
TrafficDirector Open Mesh.
SECURE_WEB_GATEWAY (2):
The type of the customer managed gateway is
SecureWebGateway (SWG).
"""
TYPE_UNSPECIFIED = 0
OPEN_MESH = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,17 @@ class MethodMatch(proto.Message):
"""

class Type(proto.Enum):
r"""The type of the match."""
r"""The type of the match.
Values:
TYPE_UNSPECIFIED (0):
Unspecified.
EXACT (1):
Will only match the exact name provided.
REGULAR_EXPRESSION (2):
Will interpret grpc_method and grpc_service as regexes. RE2
syntax is supported.
"""
TYPE_UNSPECIFIED = 0
EXACT = 1
REGULAR_EXPRESSION = 2
Expand Down Expand Up @@ -184,7 +194,17 @@ class HeaderMatch(proto.Message):
"""

class Type(proto.Enum):
r"""The type of match."""
r"""The type of match.
Values:
TYPE_UNSPECIFIED (0):
Unspecified.
EXACT (1):
Will only match the exact value provided.
REGULAR_EXPRESSION (2):
Will match paths conforming to the prefix
specified by value. RE2 syntax is supported.
"""
TYPE_UNSPECIFIED = 0
EXACT = 1
REGULAR_EXPRESSION = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,24 @@ class Redirect(proto.Message):
"""

class ResponseCode(proto.Enum):
r"""Supported HTTP response code."""
r"""Supported HTTP response code.
Values:
RESPONSE_CODE_UNSPECIFIED (0):
Default value
MOVED_PERMANENTLY_DEFAULT (1):
Corresponds to 301.
FOUND (2):
Corresponds to 302.
SEE_OTHER (3):
Corresponds to 303.
TEMPORARY_REDIRECT (4):
Corresponds to 307. In this case, the request
method will be retained.
PERMANENT_REDIRECT (5):
Corresponds to 308. In this case, the request
method will be retained.
"""
RESPONSE_CODE_UNSPECIFIED = 0
MOVED_PERMANENTLY_DEFAULT = 1
FOUND = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-network-services",
"version": "0.4.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit c8b5638

Please sign in to comment.