@google-cloud/dlp 6.4.0 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -193,6 +193,17 @@ message CustomInfoType {
193
193
  // not support the use of `detection_rules`.
194
194
  message SurrogateType {}
195
195
 
196
+ // Configuration for a custom infoType that detects key-value pairs in the
197
+ // metadata matching the specified regular expressions.
198
+ message MetadataKeyValueExpression {
199
+ // The regular expression for the key. Key should be
200
+ // non-empty.
201
+ string key_regex = 1;
202
+
203
+ // The regular expression for the value. Value should be non-empty.
204
+ string value_regex = 2;
205
+ }
206
+
196
207
  // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
197
208
  // `CustomInfoType` to alter behavior under certain circumstances, depending
198
209
  // on the specific details of the rule. Not supported for the `surrogate_type`
@@ -299,18 +310,21 @@ message CustomInfoType {
299
310
  // support reversing.
300
311
  SurrogateType surrogate_type = 4;
301
312
 
302
- // Load an existing `StoredInfoType` resource for use in
303
- // `InspectDataSource`. Not currently supported in `InspectContent`.
313
+ // Loads an existing `StoredInfoType` resource.
304
314
  StoredType stored_type = 5;
315
+
316
+ // Key-value pair to detect in the metadata.
317
+ MetadataKeyValueExpression metadata_key_value_expression = 10;
305
318
  }
306
319
 
307
320
  // Set of detection rules to apply to all findings of this CustomInfoType.
308
- // Rules are applied in order that they are specified. Not supported for the
309
- // `surrogate_type` CustomInfoType.
321
+ // Rules are applied in the order that they are specified. Only supported
322
+ // for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes.
310
323
  repeated DetectionRule detection_rules = 7;
311
324
 
312
325
  // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
313
- // to be returned. It still can be used for rules matching.
326
+ // to be returned. It still can be used for rules matching. Only supported
327
+ // for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes.
314
328
  ExclusionType exclusion_type = 8;
315
329
 
316
330
  // Sensitivity for this CustomInfoType. If this CustomInfoType extends an