diff --git a/BigQueryDataPolicies/metadata/V1/Datapolicy.php b/BigQueryDataPolicies/metadata/V1/Datapolicy.php index e7871c7a05dd..431a7b1d2c26 100644 Binary files a/BigQueryDataPolicies/metadata/V1/Datapolicy.php and b/BigQueryDataPolicies/metadata/V1/Datapolicy.php differ diff --git a/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php b/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php index 127ef1921b4b..92c27b5fc1f5 100644 --- a/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php +++ b/BigQueryDataPolicies/src/V1/DataMaskingPolicy/PredefinedExpression.php @@ -42,10 +42,10 @@ class PredefinedExpression * * FLOAT: 0.0 * * NUMERIC: 0 * * BOOLEAN: FALSE - * * TIMESTAMP: 0001-01-01 00:00:00 UTC - * * DATE: 0001-01-01 + * * TIMESTAMP: 1970-01-01 00:00:00 UTC + * * DATE: 1970-01-01 * * TIME: 00:00:00 - * * DATETIME: 0001-01-01T00:00:00 + * * DATETIME: 1970-01-01T00:00:00 * * GEOGRAPHY: POINT(0 0) * * BIGNUMERIC: 0 * * ARRAY: [] @@ -55,12 +55,64 @@ class PredefinedExpression * Generated from protobuf enum DEFAULT_MASKING_VALUE = 7; */ const DEFAULT_MASKING_VALUE = 7; + /** + * Masking expression shows the last four characters of text. + * The masking behavior is as follows: + * * If text length > 4 characters: Replace text with XXXXX, append last + * four characters of original text. + * * If text length <= 4 characters: Apply SHA-256 hash. + * + * Generated from protobuf enum LAST_FOUR_CHARACTERS = 9; + */ + const LAST_FOUR_CHARACTERS = 9; + /** + * Masking expression shows the first four characters of text. + * The masking behavior is as follows: + * * If text length > 4 characters: Replace text with XXXXX, prepend first + * four characters of original text. + * * If text length <= 4 characters: Apply SHA-256 hash. + * + * Generated from protobuf enum FIRST_FOUR_CHARACTERS = 10; + */ + const FIRST_FOUR_CHARACTERS = 10; + /** + * Masking expression for email addresses. + * The masking behavior is as follows: + * * Syntax-valid email address: Replace username with XXXXX. For example, + * cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. + * * Syntax-invalid email address: Apply SHA-256 hash. + * For more information, see [Email + * mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). + * + * Generated from protobuf enum EMAIL_MASK = 12; + */ + const EMAIL_MASK = 12; + /** + * Masking expression to only show the year of `Date`, + * `DateTime` and `TimeStamp`. For example, with the + * year 2076: + * * DATE : 2076-01-01 + * * DATETIME : 2076-01-01T00:00:00 + * * TIMESTAMP : 2076-01-01 00:00:00 UTC + * Truncation occurs according to the UTC time zone. To change this, adjust + * the default time zone using the `time_zone` system variable. + * For more information, see the System + * variables reference. + * + * Generated from protobuf enum DATE_YEAR_MASK = 13; + */ + const DATE_YEAR_MASK = 13; private static $valueToName = [ self::PREDEFINED_EXPRESSION_UNSPECIFIED => 'PREDEFINED_EXPRESSION_UNSPECIFIED', self::SHA256 => 'SHA256', self::ALWAYS_NULL => 'ALWAYS_NULL', self::DEFAULT_MASKING_VALUE => 'DEFAULT_MASKING_VALUE', + self::LAST_FOUR_CHARACTERS => 'LAST_FOUR_CHARACTERS', + self::FIRST_FOUR_CHARACTERS => 'FIRST_FOUR_CHARACTERS', + self::EMAIL_MASK => 'EMAIL_MASK', + self::DATE_YEAR_MASK => 'DATE_YEAR_MASK', ]; public static function name($value) diff --git a/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php b/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php index 04b61348b74e..8b535c6ef6b4 100644 --- a/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php +++ b/BigQueryDataPolicies/src/V1/Gapic/DataPolicyServiceGapicClient.php @@ -561,9 +561,10 @@ public function getIamPolicy($resource, array $optionalArgs = []) * are associated with. Currently filter only supports * "policy_tag" based filtering and OR based predicates. Sample * filter can be "policy_tag: - * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use - * wildcard such as "policy_tag: - * `'projects/1/locations/us/taxonomies/2/*'`". + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on diff --git a/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php b/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php index 3e2b77351376..fa721073711e 100644 --- a/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php +++ b/BigQueryDataPolicies/src/V1/ListDataPoliciesRequest.php @@ -42,9 +42,10 @@ class ListDataPoliciesRequest extends \Google\Protobuf\Internal\Message * are associated with. Currently filter only supports * "policy_tag" based filtering and OR based predicates. Sample * filter can be "policy_tag: - * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use - * wildcard such as "policy_tag: - * `'projects/1/locations/us/taxonomies/2/*'`". + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. * * Generated from protobuf field string filter = 4; */ @@ -86,9 +87,10 @@ public static function build(string $parent): self * are associated with. Currently filter only supports * "policy_tag" based filtering and OR based predicates. Sample * filter can be "policy_tag: - * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use - * wildcard such as "policy_tag: - * `'projects/1/locations/us/taxonomies/2/*'`". + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. * } */ public function __construct($data = NULL) { @@ -187,9 +189,10 @@ public function setPageToken($var) * are associated with. Currently filter only supports * "policy_tag" based filtering and OR based predicates. Sample * filter can be "policy_tag: - * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use - * wildcard such as "policy_tag: - * `'projects/1/locations/us/taxonomies/2/*'`". + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. * * Generated from protobuf field string filter = 4; * @return string @@ -204,9 +207,10 @@ public function getFilter() * are associated with. Currently filter only supports * "policy_tag" based filtering and OR based predicates. Sample * filter can be "policy_tag: - * `'projects/1/locations/us/taxonomies/2/policyTags/3'`". You may use - * wildcard such as "policy_tag: - * `'projects/1/locations/us/taxonomies/2/*'`". + * projects/1/locations/us/taxonomies/2/policyTags/3". + * You may also use wildcard such as "policy_tag: + * projects/1/locations/us/taxonomies/2*". Please note that OR predicates + * cannot be used with wildcard filters. * * Generated from protobuf field string filter = 4; * @param string $var