Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new fields within
deidentify_config
field of `google_data_loss_…
…prevention_deidentify_template` resource (#6872) (#4996) * Start adding `recordTransformations` field, make mutually exclusive with `infoTypeTransformations` This stops `infoTypeTransformations` being required - not a breaking change? * Add `recordTransformationsfieldTransformations.fields.*` fields * Add `recordTransformationsfieldTransformations.condition.*` fields and validation Note: this is a repeat of something already in the file but they differ by use of `exactly_one_of`. * Add `recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.*` fields and validation * Add `recordTransformations.fieldTransformations.primitiveTransformation.redactConfig.*` fields * Make 'values' fields in `confitions` and `replaceConfig` fields both have exactly_one_of restrictions and same descriptions * Add comments about `exactly_one_of` entries that are yet to be implemented * Fix mistake - `redactConfig` is meant to be an empty object, attribute properties in yaml to `characterMaskConfig` field instead * Update existing DeidentifyTemplate tests to reflect use of `infoTypeTransformations` field * Add new DeidentifyTemplate test that uses implemented `recordTransformations` fields * Fix unclosed strings in acceptance test * Fix error in generating `exactly_one_of` entries * Fix error where `fieldTransformations` should be an array, remove incompatible use of `exactly_one_of` A bug in the SDK means that `exactly_one_of` doesn't work with fields nested within arrays * Refactor and rename tests * go fmt * Update test name to allow multiple tests that set `recordTransformations` * Allow empty `redactConfig` object to be sent to API * Add acceptance test for use of `redactConfig` transformation * Update `replaceConfig` config test to add a second condition To check for any reordering by the API * Add acceptance test for use of `characterMaskConfig` transformation * go fmt * MAke `primitiveTransformation` a required field * Remove ineffective `exactly_one_of` blocks These currently create empty ExactlyOneOf lists in the downstream * Update descriptions for `redactConfig`, `characterMaskConfig` * Refactor acceptance tests into single `recordTransformations` test Tests `replace_config`, `redact_config` and `character_mask_config` * Update docs after feedback * Add missing validation for `replace_config.new_value` fields * Update acc tests to include removal of blocks Test removal of field_transformations, conditions * Update docs to show that primitive_transformation is a union field * Update mmv1/products/dlp/api.yaml Co-authored-by: Stephen Lewis (Burrows) <[email protected]> * Update mmv1/products/dlp/api.yaml Co-authored-by: Stephen Lewis (Burrows) <[email protected]> Co-authored-by: Stephen Lewis (Burrows) <[email protected]> Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
- Loading branch information