Skip to content

Commit

Permalink
docs: Add documentation for enums (#18)
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 b43893d commit 4c04ced
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

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

class DataPolicyType(proto.Enum):
r"""A list of supported data policy types."""
r"""A list of supported data policy types.
Values:
DATA_POLICY_TYPE_UNSPECIFIED (0):
Default value for the data policy type. This
should not be used.
COLUMN_LEVEL_SECURITY_POLICY (3):
Used to create a data policy for column-level
security, without data masking.
DATA_MASKING_POLICY (2):
Used to create a data policy for data
masking.
"""
DATA_POLICY_TYPE_UNSPECIFIED = 0
COLUMN_LEVEL_SECURITY_POLICY = 3
DATA_MASKING_POLICY = 2
Expand Down Expand Up @@ -292,6 +304,38 @@ class DataMaskingPolicy(proto.Message):
class PredefinedExpression(proto.Enum):
r"""The available masking rules. Learn more here:
https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.
Values:
PREDEFINED_EXPRESSION_UNSPECIFIED (0):
Default, unspecified predefined expression.
No masking will take place since no expression
is specified.
SHA256 (3):
Masking expression to replace data with
SHA-256 hash.
ALWAYS_NULL (5):
Masking expression to replace data with
NULLs.
DEFAULT_MASKING_VALUE (7):
Masking expression to replace data with their default
masking values. The default masking values for each type
listed as below:
- STRING: ""
- BYTES: b''
- INTEGER: 0
- FLOAT: 0.0
- NUMERIC: 0
- BOOLEAN: FALSE
- TIMESTAMP: 0001-01-01 00:00:00 UTC
- DATE: 0001-01-01
- TIME: 00:00:00
- DATETIME: 0001-01-01T00:00:00
- GEOGRAPHY: POINT(0 0)
- BIGNUMERIC: 0
- ARRAY: []
- STRUCT: NOT_APPLICABLE
- JSON: NULL
"""
PREDEFINED_EXPRESSION_UNSPECIFIED = 0
SHA256 = 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ def sample_test_iam_permissions():
# Done; return the response.
return response

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

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

class DataPolicyType(proto.Enum):
r"""A list of supported data policy types."""
r"""A list of supported data policy types.
Values:
DATA_POLICY_TYPE_UNSPECIFIED (0):
Default value for the data policy type. This
should not be used.
COLUMN_LEVEL_SECURITY_POLICY (3):
Used to create a data policy for column-level
security, without data masking.
DATA_MASKING_POLICY (2):
Used to create a data policy for data
masking.
"""
DATA_POLICY_TYPE_UNSPECIFIED = 0
COLUMN_LEVEL_SECURITY_POLICY = 3
DATA_MASKING_POLICY = 2
Expand Down Expand Up @@ -257,6 +269,38 @@ class DataMaskingPolicy(proto.Message):
class PredefinedExpression(proto.Enum):
r"""The available masking rules. Learn more here:
https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.
Values:
PREDEFINED_EXPRESSION_UNSPECIFIED (0):
Default, unspecified predefined expression.
No masking will take place since no expression
is specified.
SHA256 (3):
Masking expression to replace data with
SHA-256 hash.
ALWAYS_NULL (5):
Masking expression to replace data with
NULLs.
DEFAULT_MASKING_VALUE (7):
Masking expression to replace data with their default
masking values. The default masking values for each type
listed as below:
- STRING: ""
- BYTES: b''
- INTEGER: 0
- FLOAT: 0.0
- NUMERIC: 0
- BOOLEAN: FALSE
- TIMESTAMP: 0001-01-01 00:00:00 UTC
- DATE: 0001-01-01
- TIME: 00:00:00
- DATETIME: 0001-01-01T00:00:00
- GEOGRAPHY: POINT(0 0)
- BIGNUMERIC: 0
- ARRAY: []
- STRUCT: NOT_APPLICABLE
- JSON: NULL
"""
PREDEFINED_EXPRESSION_UNSPECIFIED = 0
SHA256 = 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-bigquery-datapolicies",
"version": "0.3.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-bigquery-datapolicies",
"version": "0.3.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 4c04ced

Please sign in to comment.