Skip to content

Commit

Permalink
docs: Add documentation for enums (#151)
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 9919116 commit 4182f7f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ def sample_update_tunnel_dest_group():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ def sample_delete_identity_aware_proxy_client():
metadata=metadata,
)

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

def __exit__(self, type, value, traceback):
Expand Down
42 changes: 40 additions & 2 deletions packages/google-cloud-iap/google/cloud/iap_v1/types/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,38 @@ class ReauthSettings(proto.Message):
"""

class Method(proto.Enum):
r"""Types of reauthentication methods supported by IAP."""
r"""Types of reauthentication methods supported by IAP.
Values:
METHOD_UNSPECIFIED (0):
Reauthentication disabled.
LOGIN (1):
Prompts the user to log in again.
PASSWORD (2):
Deprecated, no longer accepted by IAP APIs.
SECURE_KEY (3):
User must use their secure key 2nd factor
device.
"""
METHOD_UNSPECIFIED = 0
LOGIN = 1
PASSWORD = 2
SECURE_KEY = 3

class PolicyType(proto.Enum):
r"""Type of policy in the case of hierarchial policies."""
r"""Type of policy in the case of hierarchial policies.
Values:
POLICY_TYPE_UNSPECIFIED (0):
Default value. This value is unused.
MINIMUM (1):
This policy acts as a minimum to other
policies, lower in the hierarchy. Effective
policy may only be the same or stricter.
DEFAULT (2):
This policy acts as a default if no other
reauth policy is set.
"""
POLICY_TYPE_UNSPECIFIED = 0
MINIMUM = 1
DEFAULT = 2
Expand Down Expand Up @@ -676,6 +700,20 @@ class OutputCredentials(proto.Enum):
output credential maps to a "field" in the response. For
example, selecting JWT will propagate all attributes in the IAP
JWT, header in the headers, etc.
Values:
OUTPUT_CREDENTIALS_UNSPECIFIED (0):
No output credential. This is an unsupported
default.
HEADER (1):
Propagate attributes in the headers with
"x-goog-iap-attr-" prefix.
JWT (2):
Propagate attributes in the JWT of the form:
``"additional_claims": { "my_attribute": ["value1", "value2"] }``
RCTOKEN (3):
Propagate attributes in the RCToken of the form:
``"additional_claims": { "my_attribute": ["value1", "value2"] }``
"""
OUTPUT_CREDENTIALS_UNSPECIFIED = 0
HEADER = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-iap",
"version": "1.8.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 4182f7f

Please sign in to comment.