From 15eb91a820bb09a2840860ce371368d79a3dfbe3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 17 Mar 2020 16:10:29 -0700 Subject: [PATCH 001/406] samples: scaffold pom.xml files (#99) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-03-17 11:35:10,319 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py. 2020-03-17 11:35:10,375 synthtool > Ensuring dependencies. 2020-03-17 11:35:10,380 synthtool > Pulling artman image. latest: Pulling from googleapis/artman Digest: sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b Status: Image is up to date for googleapis/artman:latest 2020-03-17 11:35:11,314 synthtool > Cloning googleapis. 2020-03-17 11:35:11,947 synthtool > Running generator for google/privacy/dlp/artman_dlp_v2.yaml. 2020-03-17 11:35:24,730 synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java. 2020-03-17 11:35:24,733 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,733 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java. 2020-03-17 11:35:24,734 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java. 2020-03-17 11:35:24,734 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java. 2020-03-17 11:35:24,734 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java. 2020-03-17 11:35:24,734 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java. 2020-03-17 11:35:24,735 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java. 2020-03-17 11:35:24,735 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java. 2020-03-17 11:35:24,735 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java. 2020-03-17 11:35:24,736 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java. 2020-03-17 11:35:24,736 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java. 2020-03-17 11:35:24,736 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java. 2020-03-17 11:35:24,736 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java. 2020-03-17 11:35:24,736 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,737 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java. 2020-03-17 11:35:24,737 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java. 2020-03-17 11:35:24,737 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java. 2020-03-17 11:35:24,737 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,738 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java. 2020-03-17 11:35:24,738 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java. 2020-03-17 11:35:24,743 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java. 2020-03-17 11:35:24,743 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java. 2020-03-17 11:35:24,743 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java. 2020-03-17 11:35:24,744 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java. 2020-03-17 11:35:24,744 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java. 2020-03-17 11:35:24,744 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java. 2020-03-17 11:35:24,744 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java. 2020-03-17 11:35:24,745 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java. 2020-03-17 11:35:24,745 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,745 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java. 2020-03-17 11:35:24,745 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java. 2020-03-17 11:35:24,746 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java. 2020-03-17 11:35:24,746 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java. 2020-03-17 11:35:24,746 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java. 2020-03-17 11:35:24,746 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java. 2020-03-17 11:35:24,747 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java. 2020-03-17 11:35:24,747 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java. 2020-03-17 11:35:24,747 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java. 2020-03-17 11:35:24,747 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java. 2020-03-17 11:35:24,748 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java. 2020-03-17 11:35:24,748 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java. 2020-03-17 11:35:24,748 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java. 2020-03-17 11:35:24,748 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java. 2020-03-17 11:35:24,749 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java. 2020-03-17 11:35:24,749 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java. 2020-03-17 11:35:24,749 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java. 2020-03-17 11:35:24,749 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java. 2020-03-17 11:35:24,750 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,750 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java. 2020-03-17 11:35:24,750 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java. 2020-03-17 11:35:24,751 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java. 2020-03-17 11:35:24,751 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java. 2020-03-17 11:35:24,752 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java. 2020-03-17 11:35:24,752 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java. 2020-03-17 11:35:24,752 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java. 2020-03-17 11:35:24,752 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java. 2020-03-17 11:35:24,753 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,753 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java. 2020-03-17 11:35:24,753 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java. 2020-03-17 11:35:24,754 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java. 2020-03-17 11:35:24,754 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java. 2020-03-17 11:35:24,754 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java. 2020-03-17 11:35:24,755 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java. 2020-03-17 11:35:24,755 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java. 2020-03-17 11:35:24,755 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java. 2020-03-17 11:35:24,755 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java. 2020-03-17 11:35:24,756 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,756 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java. 2020-03-17 11:35:24,756 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java. 2020-03-17 11:35:24,757 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java. 2020-03-17 11:35:24,757 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java. 2020-03-17 11:35:24,757 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java. 2020-03-17 11:35:24,757 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java. 2020-03-17 11:35:24,757 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java. 2020-03-17 11:35:24,758 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java. 2020-03-17 11:35:24,758 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java. 2020-03-17 11:35:24,758 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java. 2020-03-17 11:35:24,758 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java. 2020-03-17 11:35:24,759 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java. 2020-03-17 11:35:24,759 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java. 2020-03-17 11:35:24,759 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java. 2020-03-17 11:35:24,760 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java. 2020-03-17 11:35:24,760 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java. 2020-03-17 11:35:24,760 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java. 2020-03-17 11:35:24,760 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java. 2020-03-17 11:35:24,761 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java. 2020-03-17 11:35:24,761 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java. 2020-03-17 11:35:24,761 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java. 2020-03-17 11:35:24,761 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java. 2020-03-17 11:35:24,762 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java. 2020-03-17 11:35:24,762 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java. 2020-03-17 11:35:24,762 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java. 2020-03-17 11:35:24,763 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java. 2020-03-17 11:35:24,763 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java. 2020-03-17 11:35:24,763 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java. 2020-03-17 11:35:24,764 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java. 2020-03-17 11:35:24,764 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java. 2020-03-17 11:35:24,764 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java. 2020-03-17 11:35:24,765 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java. 2020-03-17 11:35:24,765 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java. 2020-03-17 11:35:24,765 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java. 2020-03-17 11:35:24,765 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java. 2020-03-17 11:35:24,766 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java. 2020-03-17 11:35:24,766 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java. 2020-03-17 11:35:24,766 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java. 2020-03-17 11:35:24,766 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java. 2020-03-17 11:35:24,767 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java. 2020-03-17 11:35:24,767 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java. 2020-03-17 11:35:24,768 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java. 2020-03-17 11:35:24,768 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java. 2020-03-17 11:35:24,768 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java. 2020-03-17 11:35:24,768 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java. 2020-03-17 11:35:24,769 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java. 2020-03-17 11:35:24,769 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java. 2020-03-17 11:35:24,769 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java. 2020-03-17 11:35:24,770 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java. 2020-03-17 11:35:24,770 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java. 2020-03-17 11:35:24,770 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java. 2020-03-17 11:35:24,770 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,771 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java. 2020-03-17 11:35:24,771 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java. 2020-03-17 11:35:24,771 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java. 2020-03-17 11:35:24,772 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java. 2020-03-17 11:35:24,772 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java. 2020-03-17 11:35:24,772 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java. 2020-03-17 11:35:24,772 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java. 2020-03-17 11:35:24,773 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java. 2020-03-17 11:35:24,773 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java. 2020-03-17 11:35:24,773 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java. 2020-03-17 11:35:24,773 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java. 2020-03-17 11:35:24,774 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java. 2020-03-17 11:35:24,774 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,774 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java. 2020-03-17 11:35:24,774 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java. 2020-03-17 11:35:24,774 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java. 2020-03-17 11:35:24,775 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java. 2020-03-17 11:35:24,775 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java. 2020-03-17 11:35:24,775 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java. 2020-03-17 11:35:24,776 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java. 2020-03-17 11:35:24,776 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java. 2020-03-17 11:35:24,776 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java. 2020-03-17 11:35:24,777 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java. 2020-03-17 11:35:24,778 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java. 2020-03-17 11:35:24,778 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,778 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,778 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java. 2020-03-17 11:35:24,779 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java. 2020-03-17 11:35:24,779 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java. 2020-03-17 11:35:24,779 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java. 2020-03-17 11:35:24,780 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java. 2020-03-17 11:35:24,780 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java. 2020-03-17 11:35:24,780 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java. 2020-03-17 11:35:24,780 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java. 2020-03-17 11:35:24,781 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java. 2020-03-17 11:35:24,781 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java. 2020-03-17 11:35:24,781 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java. 2020-03-17 11:35:24,782 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java. 2020-03-17 11:35:24,782 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java. 2020-03-17 11:35:24,782 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java. 2020-03-17 11:35:24,782 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java. 2020-03-17 11:35:24,783 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java. 2020-03-17 11:35:24,783 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java. 2020-03-17 11:35:24,783 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java. 2020-03-17 11:35:24,784 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java. 2020-03-17 11:35:24,784 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java. 2020-03-17 11:35:24,784 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java. 2020-03-17 11:35:24,784 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java. 2020-03-17 11:35:24,784 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,785 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java. 2020-03-17 11:35:24,785 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java. 2020-03-17 11:35:24,785 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java. 2020-03-17 11:35:24,786 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java. 2020-03-17 11:35:24,786 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java. 2020-03-17 11:35:24,786 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java. 2020-03-17 11:35:24,786 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java. 2020-03-17 11:35:24,787 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java. 2020-03-17 11:35:24,787 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java. 2020-03-17 11:35:24,787 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java. 2020-03-17 11:35:24,787 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java. 2020-03-17 11:35:24,788 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java. 2020-03-17 11:35:24,788 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java. 2020-03-17 11:35:24,788 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java. 2020-03-17 11:35:24,788 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java. 2020-03-17 11:35:24,789 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java. 2020-03-17 11:35:24,789 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java. 2020-03-17 11:35:24,789 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java. 2020-03-17 11:35:24,789 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java. 2020-03-17 11:35:24,790 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java. 2020-03-17 11:35:24,790 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java. 2020-03-17 11:35:24,790 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java. 2020-03-17 11:35:24,791 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java. 2020-03-17 11:35:24,791 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java. 2020-03-17 11:35:24,791 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java. 2020-03-17 11:35:24,792 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java. 2020-03-17 11:35:24,792 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java. 2020-03-17 11:35:24,792 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java. 2020-03-17 11:35:24,792 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java. 2020-03-17 11:35:24,793 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java. 2020-03-17 11:35:24,793 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java. 2020-03-17 11:35:24,793 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java. 2020-03-17 11:35:24,793 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java. 2020-03-17 11:35:24,794 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java. 2020-03-17 11:35:24,794 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java. 2020-03-17 11:35:24,794 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java. 2020-03-17 11:35:24,794 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java. 2020-03-17 11:35:24,795 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java. 2020-03-17 11:35:24,795 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java. 2020-03-17 11:35:24,795 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java. 2020-03-17 11:35:24,796 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java. 2020-03-17 11:35:24,796 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java. 2020-03-17 11:35:24,796 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java. 2020-03-17 11:35:24,796 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java. 2020-03-17 11:35:24,797 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java. 2020-03-17 11:35:24,797 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java. 2020-03-17 11:35:24,797 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,797 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java. 2020-03-17 11:35:24,797 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java. 2020-03-17 11:35:24,798 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java. 2020-03-17 11:35:24,798 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java. 2020-03-17 11:35:24,798 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java. 2020-03-17 11:35:24,799 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java. 2020-03-17 11:35:24,799 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java. 2020-03-17 11:35:24,799 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java. 2020-03-17 11:35:24,799 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java. 2020-03-17 11:35:24,800 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java. 2020-03-17 11:35:24,800 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java. 2020-03-17 11:35:24,800 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,800 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,801 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java. 2020-03-17 11:35:24,801 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java. 2020-03-17 11:35:24,801 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java. 2020-03-17 11:35:24,801 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java. 2020-03-17 11:35:24,802 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java. 2020-03-17 11:35:24,802 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java. 2020-03-17 11:35:24,802 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java. 2020-03-17 11:35:24,802 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java. 2020-03-17 11:35:24,803 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java. 2020-03-17 11:35:24,803 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java. 2020-03-17 11:35:24,803 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java. 2020-03-17 11:35:24,803 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java. 2020-03-17 11:35:24,804 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java. 2020-03-17 11:35:24,804 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java. 2020-03-17 11:35:24,804 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java. 2020-03-17 11:35:24,804 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java. 2020-03-17 11:35:24,805 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java. 2020-03-17 11:35:24,805 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java. 2020-03-17 11:35:24,805 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java. 2020-03-17 11:35:24,806 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java. 2020-03-17 11:35:24,806 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java. 2020-03-17 11:35:24,806 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java. 2020-03-17 11:35:24,806 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java. 2020-03-17 11:35:24,807 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java. 2020-03-17 11:35:24,807 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java. 2020-03-17 11:35:24,807 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java. 2020-03-17 11:35:24,808 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,808 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java. 2020-03-17 11:35:24,808 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java. 2020-03-17 11:35:24,808 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java. 2020-03-17 11:35:24,808 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java. 2020-03-17 11:35:24,809 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java. 2020-03-17 11:35:24,809 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java. 2020-03-17 11:35:24,809 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java. 2020-03-17 11:35:24,810 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java. 2020-03-17 11:35:24,810 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java. 2020-03-17 11:35:24,810 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java. 2020-03-17 11:35:24,810 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,811 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java. 2020-03-17 11:35:24,811 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java. 2020-03-17 11:35:24,811 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java. 2020-03-17 11:35:24,811 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java. 2020-03-17 11:35:24,812 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java. 2020-03-17 11:35:24,812 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java. 2020-03-17 11:35:24,812 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java. 2020-03-17 11:35:24,812 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java. 2020-03-17 11:35:24,813 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java. 2020-03-17 11:35:24,813 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java. 2020-03-17 11:35:24,813 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java. 2020-03-17 11:35:24,813 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java. 2020-03-17 11:35:24,814 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java. 2020-03-17 11:35:24,814 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java. 2020-03-17 11:35:24,814 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java. 2020-03-17 11:35:24,814 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java. 2020-03-17 11:35:24,815 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java. 2020-03-17 11:35:24,815 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java. 2020-03-17 11:35:24,815 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java. 2020-03-17 11:35:24,815 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java. 2020-03-17 11:35:24,816 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java. 2020-03-17 11:35:24,816 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java. 2020-03-17 11:35:24,816 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java. 2020-03-17 11:35:24,816 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java. 2020-03-17 11:35:24,817 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java. 2020-03-17 11:35:24,817 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java. 2020-03-17 11:35:24,823 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java. 2020-03-17 11:35:24,824 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java. 2020-03-17 11:35:24,824 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java. 2020-03-17 11:35:24,824 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java. 2020-03-17 11:35:24,825 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java. 2020-03-17 11:35:24,825 synthtool > Replaced '// Generated by the protocol buffer compiler. DO NOT EDIT!' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java. 2020-03-17 11:35:24,830 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java. 2020-03-17 11:35:24,830 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UntypedStoredInfoTypeName.java. 2020-03-17 11:35:24,830 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java. 2020-03-17 11:35:24,830 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectJobTriggerName.java. 2020-03-17 11:35:24,831 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java. 2020-03-17 11:35:24,831 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationStoredInfoTypeName.java. 2020-03-17 11:35:24,831 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UntypedInspectTemplateName.java. 2020-03-17 11:35:24,831 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectStoredInfoTypeName.java. 2020-03-17 11:35:24,832 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java. 2020-03-17 11:35:24,832 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationDeidentifyTemplateName.java. 2020-03-17 11:35:24,832 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectDeidentifyTemplateName.java. 2020-03-17 11:35:24,832 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java. 2020-03-17 11:35:24,833 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectInspectTemplateName.java. 2020-03-17 11:35:24,833 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UntypedDeidentifyTemplateName.java. 2020-03-17 11:35:24,833 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationInspectTemplateName.java. 2020-03-17 11:35:24,833 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java. 2020-03-17 11:35:24,835 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateNames.java. 2020-03-17 11:35:24,835 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateNames.java. 2020-03-17 11:35:24,836 synthtool > Replaced '/\\*\n \\* Copyright \\d{4} Google LLC\n \\*\n \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except\n \\* in compliance with the License. You may obtain a copy of the License at\n \\*\n \\* http://www.apache.org/licenses/LICENSE-2.0\n \\*\n \\* Unless required by applicable law or agreed to in writing, software distributed under the License\n \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n \\* or implied. See the License for the specific language governing permissions and limitations under\n \\* the License.\n \\*/\n' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeNames.java. 2020-03-17 11:35:24,839 synthtool > Replaced '^package (.*);' in /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java. 2020-03-17 11:35:24,937 synthtool > No files in sources [PosixPath('/home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-dlp-v2/samples/src')] were copied. Does the source contain files? 2020-03-17 11:35:24,937 synthtool > No files in sources [PosixPath('/home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-dlp-v2/samples/resources')] were copied. Does the source contain files? 2020-03-17 11:35:24,938 synthtool > No files in sources [PosixPath('/home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/java/gapic-google-cloud-dlp-v2/samples/src/**/*.manifest.yaml')] were copied. Does the source contain files? 2020-03-17 11:35:24,939 synthtool > Running java formatter on 10 files 2020-03-17 11:35:28,324 synthtool > Running java formatter on 1 files 2020-03-17 11:35:31,514 synthtool > Running java formatter on 317 files 2020-03-17 11:35:55,028 synthtool > Running java formatter on 0 files .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/support_request.md .github/PULL_REQUEST_TEMPLATE.md .github/release-please.yml .github/trusted-contribution.yml .kokoro/build.bat .kokoro/build.sh .kokoro/coerce_logs.sh .kokoro/common.cfg .kokoro/continuous/common.cfg .kokoro/continuous/dependencies.cfg .kokoro/continuous/integration.cfg .kokoro/continuous/java11.cfg .kokoro/continuous/java7.cfg .kokoro/continuous/java8-osx.cfg .kokoro/continuous/java8-win.cfg .kokoro/continuous/java8.cfg .kokoro/continuous/lint.cfg .kokoro/continuous/propose_release.cfg .kokoro/continuous/samples.cfg .kokoro/dependencies.sh .kokoro/linkage-monitor.sh .kokoro/nightly/common.cfg .kokoro/nightly/dependencies.cfg .kokoro/nightly/integration.cfg .kokoro/nightly/java11.cfg .kokoro/nightly/java7.cfg .kokoro/nightly/java8-osx.cfg .kokoro/nightly/java8-win.cfg .kokoro/nightly/java8.cfg .kokoro/nightly/lint.cfg .kokoro/nightly/samples.cfg .kokoro/presubmit/clirr.cfg .kokoro/presubmit/common.cfg .kokoro/presubmit/dependencies.cfg .kokoro/presubmit/integration.cfg .kokoro/presubmit/java11.cfg .kokoro/presubmit/java7.cfg .kokoro/presubmit/java8-osx.cfg .kokoro/presubmit/java8-win.cfg .kokoro/presubmit/java8.cfg .kokoro/presubmit/linkage-monitor.cfg .kokoro/presubmit/lint.cfg .kokoro/presubmit/samples.cfg .kokoro/release/bump_snapshot.cfg .kokoro/release/common.cfg .kokoro/release/common.sh .kokoro/release/drop.cfg .kokoro/release/drop.sh .kokoro/release/promote.cfg .kokoro/release/promote.sh .kokoro/release/publish_javadoc.cfg .kokoro/release/publish_javadoc.sh .kokoro/release/snapshot.cfg .kokoro/release/snapshot.sh .kokoro/release/stage.cfg .kokoro/release/stage.sh .kokoro/trampoline.sh CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md codecov.yaml java.header license-checks.xml renovate.json samples/install-without-bom/pom.xml samples/pom.xml samples/snapshot/pom.xml samples/snippets/pom.xml 2020-03-17 11:35:55,541 synthtool > merge: CODE_OF_CONDUCT.md 2020-03-17 11:35:55,542 synthtool > merge: java.header 2020-03-17 11:35:55,542 synthtool > merge: license-checks.xml 2020-03-17 11:35:55,543 synthtool > merge: LICENSE 2020-03-17 11:35:55,543 synthtool > merge: README.md 2020-03-17 11:35:55,543 synthtool > merge: CONTRIBUTING.md 2020-03-17 11:35:55,543 synthtool > merge: renovate.json 2020-03-17 11:35:55,544 synthtool > merge: codecov.yaml 2020-03-17 11:35:55,545 synthtool > merge: .kokoro/build.sh 2020-03-17 11:35:55,545 synthtool > merge: .kokoro/coerce_logs.sh 2020-03-17 11:35:55,545 synthtool > merge: .kokoro/dependencies.sh 2020-03-17 11:35:55,546 synthtool > merge: .kokoro/linkage-monitor.sh 2020-03-17 11:35:55,546 synthtool > merge: .kokoro/trampoline.sh 2020-03-17 11:35:55,546 synthtool > merge: .kokoro/common.cfg 2020-03-17 11:35:55,546 synthtool > merge: .kokoro/build.bat 2020-03-17 11:35:55,547 synthtool > merge: .kokoro/release/promote.sh 2020-03-17 11:35:55,547 synthtool > merge: .kokoro/release/snapshot.sh 2020-03-17 11:35:55,547 synthtool > merge: .kokoro/release/stage.sh 2020-03-17 11:35:55,548 synthtool > merge: .kokoro/release/bump_snapshot.cfg 2020-03-17 11:35:55,548 synthtool > merge: .kokoro/release/drop.cfg 2020-03-17 11:35:55,548 synthtool > merge: .kokoro/release/snapshot.cfg 2020-03-17 11:35:55,548 synthtool > merge: .kokoro/release/promote.cfg 2020-03-17 11:35:55,549 synthtool > merge: .kokoro/release/publish_javadoc.sh 2020-03-17 11:35:55,549 synthtool > merge: .kokoro/release/common.cfg 2020-03-17 11:35:55,549 synthtool > merge: .kokoro/release/drop.sh 2020-03-17 11:35:55,549 synthtool > merge: .kokoro/release/publish_javadoc.cfg 2020-03-17 11:35:55,550 synthtool > merge: .kokoro/release/stage.cfg 2020-03-17 11:35:55,550 synthtool > merge: .kokoro/release/common.sh 2020-03-17 11:35:55,550 synthtool > merge: .kokoro/nightly/lint.cfg 2020-03-17 11:35:55,550 synthtool > merge: .kokoro/nightly/java11.cfg 2020-03-17 11:35:55,551 synthtool > merge: .kokoro/nightly/samples.cfg 2020-03-17 11:35:55,551 synthtool > merge: .kokoro/nightly/java8.cfg 2020-03-17 11:35:55,551 synthtool > merge: .kokoro/nightly/java7.cfg 2020-03-17 11:35:55,551 synthtool > merge: .kokoro/nightly/common.cfg 2020-03-17 11:35:55,552 synthtool > merge: .kokoro/nightly/dependencies.cfg 2020-03-17 11:35:55,552 synthtool > merge: .kokoro/nightly/java8-osx.cfg 2020-03-17 11:35:55,552 synthtool > merge: .kokoro/nightly/java8-win.cfg 2020-03-17 11:35:55,552 synthtool > merge: .kokoro/nightly/integration.cfg 2020-03-17 11:35:55,553 synthtool > merge: .kokoro/presubmit/lint.cfg 2020-03-17 11:35:55,553 synthtool > merge: .kokoro/presubmit/clirr.cfg 2020-03-17 11:35:55,553 synthtool > merge: .kokoro/presubmit/java11.cfg 2020-03-17 11:35:55,554 synthtool > merge: .kokoro/presubmit/samples.cfg 2020-03-17 11:35:55,554 synthtool > merge: .kokoro/presubmit/linkage-monitor.cfg 2020-03-17 11:35:55,554 synthtool > merge: .kokoro/presubmit/java8.cfg 2020-03-17 11:35:55,554 synthtool > merge: .kokoro/presubmit/java7.cfg 2020-03-17 11:35:55,555 synthtool > merge: .kokoro/presubmit/common.cfg 2020-03-17 11:35:55,555 synthtool > merge: .kokoro/presubmit/dependencies.cfg 2020-03-17 11:35:55,555 synthtool > merge: .kokoro/presubmit/java8-osx.cfg 2020-03-17 11:35:55,555 synthtool > merge: .kokoro/presubmit/java8-win.cfg 2020-03-17 11:35:55,556 synthtool > merge: .kokoro/presubmit/integration.cfg 2020-03-17 11:35:55,556 synthtool > merge: .kokoro/continuous/lint.cfg 2020-03-17 11:35:55,556 synthtool > merge: .kokoro/continuous/java11.cfg 2020-03-17 11:35:55,557 synthtool > merge: .kokoro/continuous/samples.cfg 2020-03-17 11:35:55,557 synthtool > merge: .kokoro/continuous/java8.cfg 2020-03-17 11:35:55,557 synthtool > merge: .kokoro/continuous/java7.cfg 2020-03-17 11:35:55,557 synthtool > merge: .kokoro/continuous/propose_release.cfg 2020-03-17 11:35:55,558 synthtool > merge: .kokoro/continuous/common.cfg 2020-03-17 11:35:55,558 synthtool > merge: .kokoro/continuous/dependencies.cfg 2020-03-17 11:35:55,558 synthtool > merge: .kokoro/continuous/java8-osx.cfg 2020-03-17 11:35:55,558 synthtool > merge: .kokoro/continuous/java8-win.cfg 2020-03-17 11:35:55,559 synthtool > merge: .kokoro/continuous/integration.cfg 2020-03-17 11:35:55,559 synthtool > merge: .github/trusted-contribution.yml 2020-03-17 11:35:55,559 synthtool > merge: .github/release-please.yml 2020-03-17 11:35:55,559 synthtool > merge: .github/PULL_REQUEST_TEMPLATE.md 2020-03-17 11:35:55,560 synthtool > merge: .github/ISSUE_TEMPLATE/feature_request.md 2020-03-17 11:35:55,560 synthtool > merge: .github/ISSUE_TEMPLATE/bug_report.md 2020-03-17 11:35:55,560 synthtool > merge: .github/ISSUE_TEMPLATE/support_request.md 2020-03-17 11:35:55,565 synthtool > Wrote metadata to synth.metadata. ```
--- dlp/snippets/install-without-bom/pom.xml | 84 ++++++++++++++++++++++++ dlp/snippets/pom.xml | 56 ++++++++++++++++ dlp/snippets/snapshot/pom.xml | 83 +++++++++++++++++++++++ dlp/snippets/snippets/pom.xml | 60 +++++++++++++++++ 4 files changed, 283 insertions(+) create mode 100644 dlp/snippets/install-without-bom/pom.xml create mode 100644 dlp/snippets/pom.xml create mode 100644 dlp/snippets/snapshot/pom.xml create mode 100644 dlp/snippets/snippets/pom.xml diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml new file mode 100644 index 00000000000..4018f426994 --- /dev/null +++ b/dlp/snippets/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + dlp-install-without-bom + jar + Google Cloud Data Loss Prevention Install Without Bom + https://github.com/googleapis/java-dlp + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-dlp + 1.0.1 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml new file mode 100644 index 00000000000..763fb23ac7d --- /dev/null +++ b/dlp/snippets/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-dlp-samples + 0.0.1-SNAPSHOT + pom + Google Cloud Data Loss Prevention Samples Parent + https://github.com/googleapis/java-dlp + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml new file mode 100644 index 00000000000..ac44f5618dc --- /dev/null +++ b/dlp/snippets/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + dlp-snapshot + jar + Google Cloud Data Loss Prevention Snapshot Samples + https://github.com/googleapis/java-dlp + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-dlp + 1.0.1 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml new file mode 100644 index 00000000000..412aed450c6 --- /dev/null +++ b/dlp/snippets/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + dlp-snippets + jar + Google Cloud Data Loss Prevention Snippets + https://github.com/googleapis/java-dlp + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + 4.2.0 + pom + import + + + + + + + com.google.cloud + google-cloud-dlp + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + From e361d56e004735c6872bb9332d516e19ed7027d3 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 18 Mar 2020 08:48:39 -0700 Subject: [PATCH 002/406] samples: fix snippet closing tag (#101) --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 4018f426994..29a3a35fec5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -31,7 +31,7 @@ google-cloud-dlp 1.0.1 - + junit From c353d380fe2e7719af95f3dbc6fd3ea8f80a9a9f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 23 Mar 2020 18:22:27 +0100 Subject: [PATCH 003/406] chore(deps): update dependency com.google.cloud:libraries-bom to v4.3.0 (#106) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `4.2.0` -> `4.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 412aed450c6..9d06d8a79d9 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.2.0 + 4.3.0 pom import From c77c72e0553acd08e29e20f8987b435632d751df Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 Mar 2020 20:52:10 +0100 Subject: [PATCH 004/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.13 (#110) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.12` -> `1.0.13` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.13`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.13) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.12...v1.0.13) Fix some issues w/ Checkstyle configuration. We left the option to turn it off out.
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 29a3a35fec5..2379f33e7c1 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 763fb23ac7d..b3d38332f4c 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ac44f5618dc..4667ed2bb1f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 9d06d8a79d9..a7a1eb8cc5a 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.13 From 4b264df877f9f6806875acc7faed8d5230157847 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 30 Mar 2020 20:14:13 +0200 Subject: [PATCH 005/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.14 (#115) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.13` -> `1.0.14` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.14`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.14) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.13...v1.0.14) - Update CheckStyle to 8.31 - Add SpotBugs
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 2379f33e7c1..7a97d779db1 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index b3d38332f4c..2d1b1dc0324 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4667ed2bb1f..ee91c20185a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index a7a1eb8cc5a..deeff368631 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.13 + 1.0.14 From 940590075ea8f9bde8df61a399a956f8119c85eb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 Mar 2020 00:04:41 +0200 Subject: [PATCH 006/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v1.1.0 (#117) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 7a97d779db1..836820aed96 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.0.1 + 1.1.0 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ee91c20185a..0d2a394db49 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.0.1 + 1.1.0 From d47b240b0d60670398b92fe1d2089fc995bbcfd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 21:34:27 +0200 Subject: [PATCH 007/406] chore(deps): update dependency com.google.cloud:libraries-bom to v4.4.0 (#120) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `4.3.0` -> `4.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index deeff368631..873151246b0 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.3.0 + 4.4.0 pom import From 5b6213b6a9cf5234753f268dcaaf8679a0336ec5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Apr 2020 17:48:45 +0200 Subject: [PATCH 008/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#122) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.14` -> `1.0.15` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.15`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.15) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.14...v1.0.15) - Move some stuff around (in prep for a change to release process) pom.xml's - Add an exclude filter for SpotBugs. (disable the Java 11 surprise) - Don't fail on SpotBugs issues for now - add PMD reporting - Don't fail on PMD issues for now.
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 836820aed96..bb35a64028e 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 2d1b1dc0324..03825888083 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 0d2a394db49..76ee934ce97 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 873151246b0..0890246f414 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.14 + 1.0.15 From 375198b7c49a440543e0e09b45b66f680dea29fc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Apr 2020 21:44:09 +0200 Subject: [PATCH 009/406] chore(deps): update dependency com.google.cloud:libraries-bom to v4.4.1 (#124) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `4.4.0` -> `4.4.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0890246f414..5675f906513 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.4.0 + 4.4.1 pom import From 6d52b962cb520ce0431ef16b7dedabc1f4a8f04b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Apr 2020 21:44:22 +0200 Subject: [PATCH 010/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v1.1.1 (#126) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | patch | `1.1.0` -> `1.1.1` | --- ### Release Notes
googleapis/java-dlp ### [`v1.1.1`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​111-httpswwwgithubcomgoogleapisjava-dlpcomparev110v111-2020-04-07) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v1.1.0...v1.1.1)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index bb35a64028e..b186c0de58b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.1.0 + 1.1.1 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 76ee934ce97..ddcf2ac6740 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.1.0 + 1.1.1 From 3f68f5903dad70a9c60b934170c1e01687471610 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Apr 2020 19:44:28 +0200 Subject: [PATCH 011/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5 (#136) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `4.4.1` -> `5.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 5675f906513..6d0601eafd8 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 4.4.1 + 5.1.0 pom import From 2d5e6abbf32d35c9bd273cda000ef7e3e7935ae8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 16 Apr 2020 17:50:41 +0200 Subject: [PATCH 012/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.16 (#143) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.15` -> `1.0.16` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.16`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.16) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.15...v1.0.16) Add a few SpotBugs exclusions: - `RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE` - existing - codegen bug - `UPM_UNCALLED_PRIVATE_METHOD` - probably SpotBug issue - `NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE` - likely SpotBug issue - `CLI_CONSTANT_LIST_INDEX` - style issue particular to our samples - `OBL_UNSATISFIED_OBLIGATION` - issue for SQL clients
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index b186c0de58b..3ddbfda50d9 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 03825888083..269943dab5a 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ddcf2ac6740..63817f2d498 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 6d0601eafd8..cb86d0e2fec 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 From febdce2c110e0de441569977b518e1f4dea53457 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Apr 2020 08:48:57 +0200 Subject: [PATCH 013/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.17 (#148) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | patch | `1.0.16` -> `1.0.17` | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.0.17`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/releases/v1.0.17) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.16...v1.0.17) - require -P lint Lets not burden customers with our development rules. - Move Checkstyle, ErrorProne, PMD, and SpotBugs to only run w/ -P lint - Update the Readme - spotbugs-annotations 4.0.2
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3ddbfda50d9..4a255472ff5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 269943dab5a..42ce3b8d21a 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 63817f2d498..6591fa456b4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index cb86d0e2fec..0a3a576e665 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 From d584903fdf30ebb1e265a73104fdf00c7b6691a7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Apr 2020 19:25:51 +0200 Subject: [PATCH 014/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v1.1.2 (#133) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 4a255472ff5..41ae970174a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.1.1 + 1.1.2 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6591fa456b4..8441d08fbd9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.1.1 + 1.1.2 From f9d699fa488e7d4a677be252c9678fad9b4496d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 21 Apr 2020 05:26:36 +0200 Subject: [PATCH 015/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v1.1.3 (#151) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | patch | `1.1.2` -> `1.1.3` | --- ### Release Notes
googleapis/java-dlp ### [`v1.1.3`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​113-httpswwwgithubcomgoogleapisjava-dlpcomparev112v113-2020-04-20) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v1.1.2...v1.1.3)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 41ae970174a..f879bce8f07 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.1.2 + 1.1.3 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 8441d08fbd9..50144b82136 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.1.2 + 1.1.3 From 0c102e18db3b6836f81975ec6ae11f2118c61c30 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Apr 2020 22:32:34 +0200 Subject: [PATCH 016/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5.2.0 (#158) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.1.0` -> `5.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0a3a576e665..ec23f0f07a7 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.1.0 + 5.2.0 pom import From 5e8c29b410aab27848ed9eb1db67a902c4688f66 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 29 Apr 2020 01:26:10 +0200 Subject: [PATCH 017/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5.3.0 (#162) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.2.0` -> `5.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index ec23f0f07a7..d4ab2fa3bd3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.2.0 + 5.3.0 pom import From 1a8ceba544d9e57157033b667745c236c1de9f7b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 4 May 2020 20:49:13 +0200 Subject: [PATCH 018/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v1.1.4 (#169) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index f879bce8f07..c0f1faf8675 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.1.3 + 1.1.4 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 50144b82136..4f578ea1d30 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.1.3 + 1.1.4 From 98d60546fccb52c32f52f33ca362f649298f44ed Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 May 2020 23:44:12 +0200 Subject: [PATCH 019/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5.4.0 (#181) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.3.0` -> `5.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index d4ab2fa3bd3..38a5cf55e8a 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.3.0 + 5.4.0 pom import From cb4f327f675eb997a89975736f4bd42e79de7ff5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 May 2020 20:34:22 +0200 Subject: [PATCH 020/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5.5.0 (#188) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.4.0` -> `5.5.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 38a5cf55e8a..adc17c033c7 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.4.0 + 5.5.0 pom import From f62045da7286e1321d6b29f318ddce55e0d975d6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 00:44:48 +0200 Subject: [PATCH 021/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.18 (#200) This PR contains the following updates: | Package | Update | Change | |---|---|---| | com.google.cloud.samples:shared-configuration | patch | `1.0.17` -> `1.0.18` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index c0f1faf8675..9f8cbec8c55 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 42ce3b8d21a..86ec641f3d7 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4f578ea1d30..7bf28c78120 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index adc17c033c7..2c50b41204e 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.18 From 2f5ec7c3b8fa5bc3302d6752c9239af9611ec7bc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 00:50:57 +0200 Subject: [PATCH 022/406] chore(deps): update dependency com.google.cloud:libraries-bom to v5.7.0 (#199) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.5.0` -> `5.7.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 2c50b41204e..56c17ad73ce 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.5.0 + 5.7.0 pom import From 62b196818153ec36f3afd5488c312b2994b721ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Jun 2020 01:26:49 +0200 Subject: [PATCH 023/406] chore(deps): update dependency com.google.cloud:libraries-bom to v6 (#208) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `5.7.0` -> `6.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 56c17ad73ce..fdc5e19bb79 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 5.7.0 + 6.0.0 pom import From 8c5ed81ef542ce08b30195140e916abdd9ef4b5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Jun 2020 19:40:42 +0200 Subject: [PATCH 024/406] chore(deps): update dependency com.google.cloud:libraries-bom to v7 (#211) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `6.0.0` -> `7.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index fdc5e19bb79..98fddc01e47 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 6.0.0 + 7.0.0 pom import From b5b86279482e99f4132a854f2a1ee292376fcb3a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 22 Jun 2020 22:51:28 +0200 Subject: [PATCH 025/406] build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.2.0 (#217) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [org.codehaus.mojo:build-helper-maven-plugin](http://www.mojohaus.org/build-helper-maven-plugin/) ([source](https://togithub.com/mojohaus/build-helper-maven-plugin)) | minor | `3.1.0` -> `3.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9f8cbec8c55..eec686f9fb5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-snippets-source diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7bf28c78120..5caf6cc754a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-snippets-source From 6805f672ecceacf2a8554b0e8d375f3021b8215d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 22 Jun 2020 23:47:28 +0200 Subject: [PATCH 026/406] chore(deps): update dependency com.google.cloud:libraries-bom to v7.0.1 (#218) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `7.0.0` -> `7.0.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 98fddc01e47..0bdc69a1164 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 7.0.0 + 7.0.1 pom import From e51de600212b0969b57a010b616b7f16af0da1e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Jun 2020 07:23:03 +0200 Subject: [PATCH 027/406] chore(deps): update dependency com.google.cloud:libraries-bom to v8 (#223) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `7.0.1` -> `8.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0bdc69a1164..7104c0e05c3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 7.0.1 + 8.0.0 pom import From 6ded2000c9ea508526bc6c31dd42ea6039f67414 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Jun 2020 08:39:36 +0200 Subject: [PATCH 028/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2 (#221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | major | `1.1.4` -> `2.0.0` | --- ### Release Notes
googleapis/java-dlp ### [`v2.0.0`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgoogleapisjava-dlpcomparev114v200-2020-06-22) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v1.1.4...v2.0.0) ##### ⚠ BREAKING CHANGES - Location name helpers have been removed in preparation for regionalization support. Please use a parent string directly instead. ##### Features - add WORD and PDF file type enums and new MetadataLocation proto ([#​176](https://www.github.com/googleapis/java-dlp/issues/176)) ([12aeb68](https://www.github.com/googleapis/java-dlp/commit/12aeb68a7626eecccc877bdc993e89150991718c)), closes [#​533](https://www.github.com/googleapis/java-dlp/issues/533) [#​535](https://www.github.com/googleapis/java-dlp/issues/535) - **deps:** adopt flatten plugin and google-cloud-shared-dependencies ([#​212](https://www.github.com/googleapis/java-dlp/issues/212)) ([8039912](https://www.github.com/googleapis/java-dlp/commit/8039912581d117e07c96f64440b8b4c2263296fc)) ##### Bug Fixes - change routing to remove location parameter in preparation for the addition of regional support ([#​178](https://www.github.com/googleapis/java-dlp/issues/178)) ([4be3740](https://www.github.com/googleapis/java-dlp/commit/4be3740cf5fc967b7ba84a53c9d568f0d8502308)) ##### Dependencies - update dependency com.google.api:api-common to v1.9.1 ([#​187](https://www.github.com/googleapis/java-dlp/issues/187)) ([ef3a106](https://www.github.com/googleapis/java-dlp/commit/ef3a106e19a2e3b7fc62fe7e1ad7fac476168d09)) - update dependency com.google.api:api-common to v1.9.2 ([#​194](https://www.github.com/googleapis/java-dlp/issues/194)) ([1584607](https://www.github.com/googleapis/java-dlp/commit/1584607c7e36d3a074dea94d3b6ff2a242f8e9c9)) - update dependency com.google.api.grpc:proto-google-common-protos to v1.18.0 ([#​173](https://www.github.com/googleapis/java-dlp/issues/173)) ([a1b65d4](https://www.github.com/googleapis/java-dlp/commit/a1b65d4fb390533ba5a92d03bfe482455ef43163)) - update dependency com.google.protobuf:protobuf-java to v3.12.0 ([#​180](https://www.github.com/googleapis/java-dlp/issues/180)) ([546af1c](https://www.github.com/googleapis/java-dlp/commit/546af1cd30706075872e9ebe2bdb0dcc1387cb80)) - update dependency com.google.protobuf:protobuf-java to v3.12.2 ([#​185](https://www.github.com/googleapis/java-dlp/issues/185)) ([4cf7620](https://www.github.com/googleapis/java-dlp/commit/4cf76208bc70e1ac6e02757fb7c7c41dad4cc381)) - update dependency io.grpc:grpc-bom to v1.30.0 ([#​198](https://www.github.com/googleapis/java-dlp/issues/198)) ([0701b8f](https://www.github.com/googleapis/java-dlp/commit/0701b8f3fc11ddd3b159d7584e90736f98d594a4)) ##### Documentation - regenerate with fixed URLs and new protoc ([#​192](https://www.github.com/googleapis/java-dlp/issues/192)) ([16d6d74](https://www.github.com/googleapis/java-dlp/commit/16d6d7486b36ccbfeca3c026226848fc55b0004a)) ##### [1.1.4](https://www.github.com/googleapis/java-dlp/compare/v1.1.3...v1.1.4) (2020-05-01) ##### Bug Fixes - replace all retry configs removed during GAPIC config migration ([#​165](https://www.github.com/googleapis/java-dlp/issues/165)) ([02da00e](https://www.github.com/googleapis/java-dlp/commit/02da00e9410fb26a00148c5723afa55bffe4e1c3)) ##### Dependencies - update dependency io.grpc:grpc-bom to v1.29.0 ([#​157](https://www.github.com/googleapis/java-dlp/issues/157)) ([a237797](https://www.github.com/googleapis/java-dlp/commit/a237797960a893fd311f146900d4503ca8074fdc)) - update dependency org.threeten:threetenbp to v1.4.4 ([#​159](https://www.github.com/googleapis/java-dlp/issues/159)) ([c42b4e0](https://www.github.com/googleapis/java-dlp/commit/c42b4e07acaeaf4948ae0b8ff434ac9178c951d9)) ##### [1.1.3](https://www.github.com/googleapis/java-dlp/compare/v1.1.2...v1.1.3) (2020-04-20) ##### Dependencies - update dependency com.google.guava:guava-bom to v29 ([#​134](https://www.github.com/googleapis/java-dlp/issues/134)) ([02c8daf](https://www.github.com/googleapis/java-dlp/commit/02c8dafce8ba362db32a2d26a5b8ad3f5c0b272d)) ##### [1.1.2](https://www.github.com/googleapis/java-dlp/compare/v1.1.1...v1.1.2) (2020-04-10) ##### Documentation - **v2:** regenerate documentation from protos ([#​129](https://www.github.com/googleapis/java-dlp/issues/129)) ([69517fc](https://www.github.com/googleapis/java-dlp/commit/69517fc9587b91ba970d49c6afd620aabf6ce2c7)), closes [#​123](https://www.github.com/googleapis/java-dlp/issues/123) [#​123](https://www.github.com/googleapis/java-dlp/issues/123) [#​94](https://www.github.com/googleapis/java-dlp/issues/94) [#​105](https://www.github.com/googleapis/java-dlp/issues/105) [#​475](https://www.github.com/googleapis/java-dlp/issues/475) [#​475](https://www.github.com/googleapis/java-dlp/issues/475) [#​465](https://www.github.com/googleapis/java-dlp/issues/465) [#​465](https://www.github.com/googleapis/java-dlp/issues/465) [#​476](https://www.github.com/googleapis/java-dlp/issues/476) [#​476](https://www.github.com/googleapis/java-dlp/issues/476) ##### [1.1.1](https://www.github.com/googleapis/java-dlp/compare/v1.1.0...v1.1.1) (2020-04-07) ##### Dependencies - update core dependencies ([#​94](https://www.github.com/googleapis/java-dlp/issues/94)) ([88d8307](https://www.github.com/googleapis/java-dlp/commit/88d83071de1ce2251af5c69691221e26c9526618)) - update dependency org.threeten:threetenbp to v1.4.3 ([#​105](https://www.github.com/googleapis/java-dlp/issues/105)) ([b636547](https://www.github.com/googleapis/java-dlp/commit/b63654725c1e22a3c1e0ee46b33bfbd71a65c99c))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index eec686f9fb5..08bffe1e561 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 1.1.4 + 2.0.0 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 5caf6cc754a..169f06bd714 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 1.1.4 + 2.0.0 From 034b9fbd5938b79d0bb346aacd4917438fd32f43 Mon Sep 17 00:00:00 2001 From: Jisha Abubaker Date: Tue, 18 Jul 2017 09:25:23 -0700 Subject: [PATCH 029/406] samples: DLP samples (#752) --- .../main/java/com/example/dlp/Inspect.java | 444 ++++++++++++++++++ .../main/java/com/example/dlp/Metadata.java | 96 ++++ .../src/main/java/com/example/dlp/Redact.java | 142 ++++++ .../test/java/com/example/dlp/InspectIT.java | 103 ++++ .../test/java/com/example/dlp/MetadataIT.java | 61 +++ .../test/java/com/example/dlp/RedactIT.java | 55 +++ .../snippets/src/test/resources/test.png | Bin 0 -> 21438 bytes .../snippets/src/test/resources/test.txt | 1 + 8 files changed, 902 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java create mode 100644 dlp/snippets/snippets/src/test/resources/test.png create mode 100644 dlp/snippets/snippets/src/test/resources/test.txt diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java new file mode 100644 index 00000000000..4b8750f3e76 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -0,0 +1,444 @@ +/** + * Copyright 2017, Google, Inc. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.api.gax.grpc.OperationFuture; +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.privacy.dlp.v2beta1.CloudStorageOptions; +import com.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet; +import com.google.privacy.dlp.v2beta1.ContentItem; +import com.google.privacy.dlp.v2beta1.DatastoreOptions; +import com.google.privacy.dlp.v2beta1.Finding; +import com.google.privacy.dlp.v2beta1.InfoType; +import com.google.privacy.dlp.v2beta1.InspectConfig; +import com.google.privacy.dlp.v2beta1.InspectContentRequest; +import com.google.privacy.dlp.v2beta1.InspectContentResponse; +import com.google.privacy.dlp.v2beta1.InspectOperationMetadata; +import com.google.privacy.dlp.v2beta1.InspectOperationResult; +import com.google.privacy.dlp.v2beta1.InspectResult; +import com.google.privacy.dlp.v2beta1.KindExpression; +import com.google.privacy.dlp.v2beta1.Likelihood; +import com.google.privacy.dlp.v2beta1.OutputStorageConfig; +import com.google.privacy.dlp.v2beta1.PartitionId; +import com.google.privacy.dlp.v2beta1.ResultName; +import com.google.privacy.dlp.v2beta1.StorageConfig; +import com.google.protobuf.ByteString; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +import java.net.URLConnection; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import javax.activation.MimetypesFileTypeMap; + +public class Inspect { + + private static void inspectString(String string, Likelihood minLikelihood, int maxFindings, + List infoTypes, boolean includeQuote) { + // [START dlp_inspect_string] + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // The minimum likelihood required before returning a match + // minLikelihood = LIKELIHOOD_UNSPECIFIED; + + // The maximum number of findings to report (0 = server maximum) + // maxFindings = 0; + + // The infoTypes of information to match + // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; + + // Whether to include the matching string + // includeQuote = true; + InspectConfig inspectConfig = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setMaxFindings(maxFindings) + .setIncludeQuote(includeQuote) + .build(); + + // The string to inspect + // string = 'My name is Gary and my email is gary@example.com'; + ContentItem contentItem = ContentItem.newBuilder() + .setType("text/plain") + .setValue(string) + .build(); + + InspectContentRequest request = InspectContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addItems(contentItem) + .build(); + InspectContentResponse response = dlpServiceClient.inspectContent(request); + + for (InspectResult result : response.getResultsList()) { + if (result.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + if (includeQuote) { + System.out.print("Quote: " + finding.getQuote()); + } + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } + } catch (Exception e) { + System.out.println("Error in inspectString: " + e.getMessage()); + } + // [END dlp_inspect_string] + } + + private static void inspectFile(String filePath, Likelihood minLikelihood, int maxFindings, + List infoTypes, boolean includeQuote) { + // [START dlp_inspect_file] + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // The path to a local file to inspect. Can be a text, JPG, or PNG file. + // fileName = 'path/to/image.png'; + + // The minimum likelihood required before returning a match + // minLikelihood = LIKELIHOOD_UNSPECIFIED; + + // The maximum number of findings to report (0 = server maximum) + // maxFindings = 0; + + // The infoTypes of information to match + // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; + + // Whether to include the matching string + // includeQuote = true; + Path path = Paths.get(filePath); + + // detect file mime type, default to application/octet-stream + String mimeType = URLConnection.guessContentTypeFromName(filePath); + if (mimeType == null) { + mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); + } + if (mimeType == null) { + mimeType = "application/octet-stream"; + } + + byte[] data = Files.readAllBytes(path); + ContentItem contentItem = ContentItem.newBuilder() + .setType(mimeType) + .setData(ByteString.copyFrom(data)) + .build(); + + InspectConfig inspectConfig = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setMaxFindings(maxFindings) + .setIncludeQuote(includeQuote) + .build(); + + InspectContentRequest request = InspectContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addItems(contentItem) + .build(); + InspectContentResponse response = dlpServiceClient.inspectContent(request); + + for (InspectResult result : response.getResultsList()) { + if (result.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + if (includeQuote) { + System.out.print("Quote: " + finding.getQuote()); + } + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error in inspectFile: " + e.getMessage()); + } + // [END dlp_inspect_file] + } + + private static void inspectGcsFile(String bucketName, String fileName, + Likelihood minLikelihood, List infoTypes) + throws Exception { + // [START dlp_inspect_gcs] + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { +// The name of the bucket where the file resides. + // bucketName = 'YOUR-BUCKET'; + + // The path to the file within the bucket to inspect. + // Can contain wildcards, e.g. "my-image.*" + // fileName = 'my-image.png'; + + // The minimum likelihood required before returning a match + // minLikelihood = LIKELIHOOD_UNSPECIFIED; + + // The maximum number of findings to report (0 = server maximum) + // maxFindings = 0; + + // The infoTypes of information to match + // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; + + CloudStorageOptions cloudStorageOptions = CloudStorageOptions + .newBuilder() + .setFileSet(FileSet.newBuilder().setUrl( + "gs://" + bucketName + "/" + fileName + )) + .build(); + + StorageConfig storageConfig = StorageConfig.newBuilder() + .setCloudStorageOptions(cloudStorageOptions) + .build(); + + InspectConfig inspectConfig = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + + // optionally provide an output configuration to store results, default : none + OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); + + // asynchronously submit an inspect operation + OperationFuture responseFuture = + dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); + + // ... + // block on response, returning job id of the operation + InspectOperationResult inspectOperationResult = responseFuture.get(); + ResultName resultName = inspectOperationResult.getNameAsResultName(); + InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); + + if (inspectResult.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : inspectResult.getFindingsList()) { + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error in inspectGCSFileAsync: " + e.getMessage()); + } + // [END dlp_inspect_gcs] + } + + private static void inspectDatastore(String projectId, String namespaceId, String kind, + Likelihood minLikelihood, List infoTypes) { + // [START dlp_inspect_datastore] + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // (Optional) The project ID containing the target Datastore + // projectId = my-project-id + + // (Optional) The ID namespace of the Datastore document to inspect. + // To ignore Datastore namespaces, set this to an empty string ('') + // namespaceId = ''; + + // The kind of the Datastore entity to inspect. + // kind = 'Person'; + + // The minimum likelihood required before returning a match + // minLikelihood = LIKELIHOOD_UNSPECIFIED; + + // The infoTypes of information to match + // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; + + // Get reference to the file to be inspected + PartitionId partitionId = PartitionId.newBuilder().setProjectId(projectId) + .setNamespaceId(namespaceId).build(); + KindExpression kindExpression = KindExpression.newBuilder().setName(kind).build(); + DatastoreOptions datastoreOptions = DatastoreOptions.newBuilder() + .setKind(kindExpression).setPartitionId(partitionId).build(); + StorageConfig storageConfig = StorageConfig.newBuilder() + .setDatastoreOptions(datastoreOptions).build(); + + InspectConfig inspectConfig = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + + // optionally provide an output configuration to store results, default : none + OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); + + // asynchronously submit an inspect operation + OperationFuture responseFuture = + dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); + + // ... + // block on response, returning job id of the operation + InspectOperationResult inspectOperationResult = responseFuture.get(); + ResultName resultName = inspectOperationResult.getNameAsResultName(); + InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); + + if (inspectResult.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : inspectResult.getFindingsList()) { + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error in inspectDatastore: " + e.getMessage()); + } + // [END dlp_inspect_datastore] + } + + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + Option stringOption = new Option("s", "string", true, "inspect string"); + optionsGroup.addOption(stringOption); + + Option fileOption = new Option("f", "file path", true, "inspect input file path"); + optionsGroup.addOption(fileOption); + + Option gcsOption = new Option("gcs", "Google Cloud Storage", false, "inspect GCS file"); + optionsGroup.addOption(gcsOption); + + Option datastoreOption = new Option("ds", "Google Datastore", false, "inspect Datastore kind"); + optionsGroup.addOption(datastoreOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option minLikelihoodOption = Option.builder("minLikelihood") + .hasArg(true) + .required(false) + .build(); + + commandLineOptions.addOption(minLikelihoodOption); + + Option maxFindingsOption = Option.builder("maxFindings") + .hasArg(true) + .required(false) + .build(); + + commandLineOptions.addOption(maxFindingsOption); + + Option infoTypesOption = Option.builder("infoTypes") + .hasArg(true) + .required(false) + .build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + + Option includeQuoteOption = Option.builder("includeQuote") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(includeQuoteOption); + + Option bucketNameOption = Option.builder("bucketName") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(bucketNameOption); + + Option gcsFileNameOption = Option.builder("fileName") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(gcsFileNameOption); + + Option datastoreProjectIdOption = Option.builder("projectId") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(datastoreProjectIdOption); + + Option datastoreNamespaceOption = Option.builder("namespace") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(datastoreNamespaceOption); + + Option datastoreKindOption = Option.builder("kind") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(datastoreKindOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(Inspect.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + Likelihood minLikelihood = Likelihood.valueOf(cmd.getOptionValue(minLikelihoodOption.getOpt(), + Likelihood.LIKELIHOOD_UNSPECIFIED.name())); + int maxFindings = Integer.parseInt(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); + boolean includeQuote = Boolean + .parseBoolean(cmd.getOptionValue(includeQuoteOption.getOpt(), "true")); + + List infoTypesList = Collections.emptyList(); + if (cmd.hasOption(infoTypesOption.getOpt())) { + infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } + // string inspection + if (cmd.hasOption("s")) { + String val = cmd.getOptionValue(stringOption.getOpt()); + inspectString(val, minLikelihood, maxFindings, infoTypesList, includeQuote); + } else if (cmd.hasOption("f")) { + String filePath = cmd.getOptionValue(fileOption.getOpt()); + inspectFile(filePath, minLikelihood, maxFindings, infoTypesList, includeQuote); + // gcs file inspection + } else if (cmd.hasOption("gcs")) { + String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); + String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); + inspectGcsFile(bucketName, fileName, minLikelihood, infoTypesList); + // datastore kind inspection + } else if (cmd.hasOption("ds")) { + String namespaceId = cmd.getOptionValue(datastoreNamespaceOption.getOpt(), ""); + String kind = cmd.getOptionValue(datastoreKindOption.getOpt()); + // use default project id when project id is not specified + String projectId = cmd.getOptionValue(datastoreProjectIdOption.getOpt(), + ServiceOptions.getDefaultProjectId()); + inspectDatastore(projectId, namespaceId, kind, minLikelihood, infoTypesList); + } + } +} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java new file mode 100644 index 00000000000..8045a22ef35 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java @@ -0,0 +1,96 @@ +/** + * Copyright 2017, Google, Inc. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.privacy.dlp.v2beta1.CategoryDescription; +import com.google.privacy.dlp.v2beta1.InfoTypeDescription; +import com.google.privacy.dlp.v2beta1.ListInfoTypesResponse; +import com.google.privacy.dlp.v2beta1.ListRootCategoriesResponse; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +import java.util.List; + +public class Metadata { + + private static void listInfoTypes(String category, String languageCode) throws Exception { + // [START dlp_list_info_types] + // Instantiate a DLP client + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + // The category of info types to list, e.g. category = 'GOVERNMENT'; + // Optional BCP-47 language code for localized info type friendly names, e.g. 'en-US' + ListInfoTypesResponse infoTypesResponse = dlpClient.listInfoTypes(category, languageCode); + List infoTypeDescriptions = infoTypesResponse.getInfoTypesList(); + for (InfoTypeDescription infoTypeDescription : infoTypeDescriptions) { + System.out.println("Name : " + infoTypeDescription.getName()); + System.out.println("Display name : " + infoTypeDescription.getDisplayName()); + } + } + // [END dlp_list_info_types] + } + + private static void listRootCategories(String languageCode) throws Exception { + // [START dlp_list_root_categories] + // Instantiate a DLP client + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + // The BCP-47 language code to use, e.g. 'en-US' + // languageCode = 'en-US' + ListRootCategoriesResponse rootCategoriesResponse = dlpClient + .listRootCategories(languageCode); + for (CategoryDescription categoryDescription : rootCategoriesResponse.getCategoriesList()) { + System.out.println("Name : " + categoryDescription.getName()); + System.out.println("Display name : " + categoryDescription.getDisplayName()); + } + } + // [END dlp_list_root_categories] + } + + public static void main(String[] args) throws Exception { + Options options = new Options(); + Option languageCodeOption = new Option("language", null, true, "BCP-47 language code"); + languageCodeOption.setRequired(false); + options.addOption(languageCodeOption); + + Option categoryOption = new Option("category", null, true, "Category of info types to list."); + categoryOption.setRequired(false); + options.addOption(categoryOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + try { + cmd = parser.parse(options, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(Metadata.class.getName(), options); + System.exit(1); + return; + } + String languageCode = cmd.getOptionValue(languageCodeOption.getOpt(), "en-US"); + if (cmd.hasOption(categoryOption.getOpt())) { + String category = cmd.getOptionValue(categoryOption.getOpt()); + listInfoTypes(category, languageCode); + } else { + listRootCategories(languageCode); + } + } +} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java new file mode 100644 index 00000000000..780c34dd3ff --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java @@ -0,0 +1,142 @@ +/** + * Copyright 2017, Google, Inc. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.privacy.dlp.v2beta1.ContentItem; +import com.google.privacy.dlp.v2beta1.InfoType; +import com.google.privacy.dlp.v2beta1.InspectConfig; +import com.google.privacy.dlp.v2beta1.Likelihood; +import com.google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig; +import com.google.privacy.dlp.v2beta1.RedactContentResponse; +import com.google.protobuf.ByteString; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class Redact { + + private static void redactString(String string, String replacement, Likelihood minLikelihood, + List infoTypes) throws Exception { + // [START dlp_redact_string] + // Instantiate the DLP client + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + // The minimum likelihood required before returning a match + // eg.minLikelihood = LIKELIHOOD_VERY_LIKELY; + InspectConfig inspectConfig = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + + ContentItem contentItem = ContentItem.newBuilder() + .setType("text/plain") + .setData(ByteString.copyFrom(string.getBytes())) + .build(); + + List replaceConfigs = new ArrayList<>(); + + if (infoTypes.isEmpty()) { + // replace all detected sensitive elements with replacement string + replaceConfigs.add( + ReplaceConfig.newBuilder() + .setReplaceWith(replacement) + .build()); + } else { + // Replace select info types with chosen replacement string + for (InfoType infoType : infoTypes) { + replaceConfigs.add( + ReplaceConfig.newBuilder() + .setInfoType(infoType) + .setReplaceWith(replacement) + .build()); + } + } + + RedactContentResponse contentResponse = dlpClient.redactContent( + inspectConfig, Collections.singletonList(contentItem), replaceConfigs); + for (ContentItem responseItem : contentResponse.getItemsList()) { + // print out string with redacted content + System.out.println(responseItem.getData().toStringUtf8()); + } + } + // [END dlp_redact_string] + } + + // Command line application to redact strings using the Data Loss Prevention API + public static void main(String[] args) throws Exception { + Options commandLineOptions = new Options(); + + Option stringOption = Option.builder("s") + .longOpt("source string") + .hasArg(true) + .required(true) + .build(); + commandLineOptions.addOption(stringOption); + + Option replaceOption = Option.builder("r") + .longOpt("replace string") + .hasArg(true) + .required(true) + .build(); + commandLineOptions.addOption(replaceOption); + + Option minLikelihoodOption = Option.builder("minLikelihood") + .hasArg(true) + .required(false) + .build(); + commandLineOptions.addOption(minLikelihoodOption); + + Option infoTypesOption = Option.builder("infoTypes") + .hasArg(true) + .required(false) + .build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(Redact.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + String source = cmd.getOptionValue(stringOption.getOpt()); + String replacement = cmd.getOptionValue(replaceOption.getOpt()); + + List infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + if (infoTypes != null) { + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } + redactString(source, replacement, Likelihood.LIKELIHOOD_UNSPECIFIED, infoTypesList); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java new file mode 100644 index 00000000000..fff56b734b0 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -0,0 +1,103 @@ +/** + * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You may obtain a copy of the License + * at + * + *

http://www.apache.org/licenses/LICENSE-2.0 + * + *

Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.dlp; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.PrintStream; + +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class InspectIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + // Update to Google Cloud Storage path containing test.txt + private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; + + // Update to Google Cloud Datastore Kind containing an entity + // with phone number and email address properties. + private String datastoreKind = "dlp"; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @Test + public void testStringInspectionReturnsInfoTypes() throws Exception { + String text = + "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; + Inspect.main(new String[] {"-s", text}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + + @Test + public void testTextFileInspectionReturnsInfoTypes() throws Exception { + ClassLoader classLoader = getClass().getClassLoader(); + File file = new File(classLoader.getResource("test.txt").getFile()); + Inspect.main(new String[] {"-f", file.getAbsolutePath()}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + + @Test + public void testImageFileInspectionReturnsInfoTypes() throws Exception { + ClassLoader classLoader = getClass().getClassLoader(); + File file = new File(classLoader.getResource("test.png").getFile()); + Inspect.main(new String[] {"-f", file.getAbsolutePath()}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + + // Requires that bucket by the specified name exists + @Test + public void testGcsFileInspectionReturnsInfoTypes() throws Exception { + Inspect.main(new String[] {"-gcs", "-bucketName", bucketName, "-fileName", "test.txt"}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + + // Requires a Datastore kind containing an entity + // with phone number and email address properties. + @Test + public void testDatastoreInspectionReturnsInfoTypes() throws Exception { + Inspect.main(new String[] {"-ds", "-kind", datastoreKind}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java new file mode 100644 index 00000000000..ebd0d1a2e9e --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java @@ -0,0 +1,61 @@ +/** + * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You may obtain a copy of the License + * at + * + *

http://www.apache.org/licenses/LICENSE-2.0 + * + *

Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.dlp; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class MetadataIT { + + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @Test + public void testRootCategoriesAreRetrieved() throws Exception { + Metadata.main(new String[] {}); + String output = bout.toString(); + assertTrue(output.contains("GOVERNMENT")); + assertTrue(output.contains("HEALTH")); + } + + @Test + public void testInfoTypesAreRetrieved() throws Exception { + Metadata.main(new String[] {"-category", "GOVERNMENT"}); + String output = bout.toString(); + assertTrue(output.contains("AUSTRALIA_TAX_FILE_NUMBER")); + } + + @After + public void tearDown() { + System.setOut(null); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java new file mode 100644 index 00000000000..6e768a1cedf --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java @@ -0,0 +1,55 @@ +/** + * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You may obtain a copy of the License + * at + * + *

http://www.apache.org/licenses/LICENSE-2.0 + * + *

Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.example.dlp; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class RedactIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @Test + public void testInfoTypesInStringAreReplaced() throws Exception { + String text = + "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; + Redact.main(new String[] {"-s", text, "-r", "_REDACTED_"}); + String output = bout.toString(); + assertTrue(output.contains("My phone number is _REDACTED_ and my email address is _REDACTED_")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } +} diff --git a/dlp/snippets/snippets/src/test/resources/test.png b/dlp/snippets/snippets/src/test/resources/test.png new file mode 100644 index 0000000000000000000000000000000000000000..8f32c825884261083b7d731676375303d49ca6f6 GIT binary patch literal 21438 zcmagE1yo)=(>96}ifeIqcZVA&?(XjH?(SY3ihGe_#oce*-QC@tL!Vc^?_cLX>+H4m zPIfXgu`4slBoXqmV(>87Fd!fx@Dk#}iXb2muAgyID9Fz*U4vm22nZa8g^-ZEgpd%S zyrZ3|g|!I?h8} z`UBB)&}x1|{16cluBnDvJOM{ePIjsBhe+n2%002#;Mw4Kc+ccI81<7K$1??yZ!kL8 zHO`|3F^0VkRuJeI4elc)FU2ABN1*J&bFb#g$ITfWWCSs}eRIQVf&ZPiS{>i_yzulv zU8bEK4i16>?Es_JHx&9v3erSQA(r+PBoFO4W`B22{1T+^SWp}ZgqXhDg1LgKn~K?* zu0A5-Iw%bSBz@Qvb_PT~;nH;9X<8qb3|fo_G?l^M9j8w>)0rJ(I}Az7%xof5Jsqyb zW7y4M`W>CcgqA!bi#^n&Sv=%)0%Om(=HM-7?{Om`iws|<7YV_#g^^P-fu&+4V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Oi~*>$ z2qNgZ;jm7)RjNWDtf%XYhnNY#LWvTNjqMfl@&U5FgMg6&w}k({KmNCGb{vqo6h5RH zc13&2;tlbF!-)~xu$VC0f3F+8y`E3zqU|O5qu3i2CwW`%JsDo%DtxEV{{{5xpAT9z M)pS)Wl`TL24{iKN9{>OV literal 0 HcmV?d00001 diff --git a/dlp/snippets/snippets/src/test/resources/test.txt b/dlp/snippets/snippets/src/test/resources/test.txt new file mode 100644 index 00000000000..c2ee3815bc9 --- /dev/null +++ b/dlp/snippets/snippets/src/test/resources/test.txt @@ -0,0 +1 @@ +My phone number is (223) 456-7890 and my email address is gary@somedomain.com. \ No newline at end of file From 21e7583db4ec52c6f6b25344192356f9a351ca62 Mon Sep 17 00:00:00 2001 From: Jisha Abubaker Date: Sun, 30 Jul 2017 12:15:59 -0700 Subject: [PATCH 030/406] samples: DLP dependency update, fix tests (#776) --- .../snippets/src/main/java/com/example/dlp/Inspect.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 4b8750f3e76..dc010493dac 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -15,9 +15,10 @@ package com.example.dlp; -import com.google.api.gax.grpc.OperationFuture; +import com.google.api.gax.rpc.OperationFuture; import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.longrunning.Operation; import com.google.privacy.dlp.v2beta1.CloudStorageOptions; import com.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet; import com.google.privacy.dlp.v2beta1.ContentItem; @@ -226,7 +227,7 @@ private static void inspectGcsFile(String bucketName, String fileName, OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); // asynchronously submit an inspect operation - OperationFuture responseFuture = + OperationFuture responseFuture = dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); // ... @@ -291,7 +292,7 @@ private static void inspectDatastore(String projectId, String namespaceId, Strin OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); // asynchronously submit an inspect operation - OperationFuture responseFuture = + OperationFuture responseFuture = dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); // ... From 00f69d3de53d811195034c63c43ee0e3631f61f1 Mon Sep 17 00:00:00 2001 From: Jisha Abubaker Date: Wed, 9 Aug 2017 11:55:17 -0700 Subject: [PATCH 031/406] samples: adding DLP Quickstart + redact image sample (#797) * adding DLP Quickstart + redact image sample * adding comments --- .../main/java/com/example/dlp/Inspect.java | 232 +++++++++--------- .../main/java/com/example/dlp/Metadata.java | 13 +- .../main/java/com/example/dlp/QuickStart.java | 100 ++++++++ .../src/main/java/com/example/dlp/Redact.java | 182 ++++++++++---- .../test/java/com/example/dlp/InspectIT.java | 26 +- .../test/java/com/example/dlp/MetadataIT.java | 24 +- .../java/com/example/dlp/QuickStartIT.java | 55 +++++ .../test/java/com/example/dlp/RedactIT.java | 49 +++- 8 files changed, 473 insertions(+), 208 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index dc010493dac..03e3b616b09 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -1,10 +1,11 @@ /** - * Copyright 2017, Google, Inc. + * Copyright 2017 Google Inc. + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -38,15 +39,6 @@ import com.google.privacy.dlp.v2beta1.ResultName; import com.google.privacy.dlp.v2beta1.StorageConfig; import com.google.protobuf.ByteString; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - import java.net.URLConnection; import java.nio.file.Files; import java.nio.file.Path; @@ -55,11 +47,23 @@ import java.util.Collections; import java.util.List; import javax.activation.MimetypesFileTypeMap; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; public class Inspect { - private static void inspectString(String string, Likelihood minLikelihood, int maxFindings, - List infoTypes, boolean includeQuote) { + private static void inspectString( + String string, + Likelihood minLikelihood, + int maxFindings, + List infoTypes, + boolean includeQuote) { // [START dlp_inspect_string] // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { @@ -75,24 +79,24 @@ private static void inspectString(String string, Likelihood minLikelihood, int m // Whether to include the matching string // includeQuote = true; - InspectConfig inspectConfig = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .setMaxFindings(maxFindings) - .setIncludeQuote(includeQuote) - .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setMaxFindings(maxFindings) + .setIncludeQuote(includeQuote) + .build(); // The string to inspect // string = 'My name is Gary and my email is gary@example.com'; - ContentItem contentItem = ContentItem.newBuilder() - .setType("text/plain") - .setValue(string) - .build(); - - InspectContentRequest request = InspectContentRequest.newBuilder() - .setInspectConfig(inspectConfig) - .addItems(contentItem) - .build(); + ContentItem contentItem = + ContentItem.newBuilder().setType("text/plain").setValue(string).build(); + + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addItems(contentItem) + .build(); InspectContentResponse response = dlpServiceClient.inspectContent(request); for (InspectResult result : response.getResultsList()) { @@ -115,8 +119,12 @@ private static void inspectString(String string, Likelihood minLikelihood, int m // [END dlp_inspect_string] } - private static void inspectFile(String filePath, Likelihood minLikelihood, int maxFindings, - List infoTypes, boolean includeQuote) { + private static void inspectFile( + String filePath, + Likelihood minLikelihood, + int maxFindings, + List infoTypes, + boolean includeQuote) { // [START dlp_inspect_file] // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { @@ -146,22 +154,22 @@ private static void inspectFile(String filePath, Likelihood minLikelihood, int m } byte[] data = Files.readAllBytes(path); - ContentItem contentItem = ContentItem.newBuilder() - .setType(mimeType) - .setData(ByteString.copyFrom(data)) - .build(); - - InspectConfig inspectConfig = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .setMaxFindings(maxFindings) - .setIncludeQuote(includeQuote) - .build(); - - InspectContentRequest request = InspectContentRequest.newBuilder() - .setInspectConfig(inspectConfig) - .addItems(contentItem) - .build(); + ContentItem contentItem = + ContentItem.newBuilder().setType(mimeType).setData(ByteString.copyFrom(data)).build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setMaxFindings(maxFindings) + .setIncludeQuote(includeQuote) + .build(); + + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addItems(contentItem) + .build(); InspectContentResponse response = dlpServiceClient.inspectContent(request); for (InspectResult result : response.getResultsList()) { @@ -185,13 +193,13 @@ private static void inspectFile(String filePath, Likelihood minLikelihood, int m // [END dlp_inspect_file] } - private static void inspectGcsFile(String bucketName, String fileName, - Likelihood minLikelihood, List infoTypes) + private static void inspectGcsFile( + String bucketName, String fileName, Likelihood minLikelihood, List infoTypes) throws Exception { // [START dlp_inspect_gcs] // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { -// The name of the bucket where the file resides. + // The name of the bucket where the file resides. // bucketName = 'YOUR-BUCKET'; // The path to the file within the bucket to inspect. @@ -207,21 +215,19 @@ private static void inspectGcsFile(String bucketName, String fileName, // The infoTypes of information to match // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - CloudStorageOptions cloudStorageOptions = CloudStorageOptions - .newBuilder() - .setFileSet(FileSet.newBuilder().setUrl( - "gs://" + bucketName + "/" + fileName - )) - .build(); + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(FileSet.newBuilder().setUrl("gs://" + bucketName + "/" + fileName)) + .build(); - StorageConfig storageConfig = StorageConfig.newBuilder() - .setCloudStorageOptions(cloudStorageOptions) - .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); - InspectConfig inspectConfig = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); // optionally provide an output configuration to store results, default : none OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); @@ -252,8 +258,12 @@ private static void inspectGcsFile(String bucketName, String fileName, // [END dlp_inspect_gcs] } - private static void inspectDatastore(String projectId, String namespaceId, String kind, - Likelihood minLikelihood, List infoTypes) { + private static void inspectDatastore( + String projectId, + String namespaceId, + String kind, + Likelihood minLikelihood, + List infoTypes) { // [START dlp_inspect_datastore] // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { @@ -274,19 +284,24 @@ private static void inspectDatastore(String projectId, String namespaceId, Strin // The infoTypes of information to match // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - // Get reference to the file to be inspected - PartitionId partitionId = PartitionId.newBuilder().setProjectId(projectId) - .setNamespaceId(namespaceId).build(); + // Reference to the Datastore namespace + PartitionId partitionId = + PartitionId.newBuilder().setProjectId(projectId).setNamespaceId(namespaceId).build(); + + // Reference to the Datastore kind KindExpression kindExpression = KindExpression.newBuilder().setName(kind).build(); - DatastoreOptions datastoreOptions = DatastoreOptions.newBuilder() - .setKind(kindExpression).setPartitionId(partitionId).build(); - StorageConfig storageConfig = StorageConfig.newBuilder() - .setDatastoreOptions(datastoreOptions).build(); + DatastoreOptions datastoreOptions = + DatastoreOptions.newBuilder().setKind(kindExpression).setPartitionId(partitionId).build(); + + // Construct Datastore configuration to be inspected + StorageConfig storageConfig = + StorageConfig.newBuilder().setDatastoreOptions(datastoreOptions).build(); - InspectConfig inspectConfig = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); // optionally provide an output configuration to store results, default : none OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); @@ -317,6 +332,10 @@ private static void inspectDatastore(String projectId, String namespaceId, Strin // [END dlp_inspect_datastore] } + /** + * Command line application to inspect data using the Data Loss Prevention API. + * Supported data formats : string, file, text files on GCS and Datastore entities + */ public static void main(String[] args) throws Exception { OptionGroup optionsGroup = new OptionGroup(); @@ -336,61 +355,37 @@ public static void main(String[] args) throws Exception { Options commandLineOptions = new Options(); commandLineOptions.addOptionGroup(optionsGroup); - Option minLikelihoodOption = Option.builder("minLikelihood") - .hasArg(true) - .required(false) - .build(); + Option minLikelihoodOption = + Option.builder("minLikelihood").hasArg(true).required(false).build(); commandLineOptions.addOption(minLikelihoodOption); - Option maxFindingsOption = Option.builder("maxFindings") - .hasArg(true) - .required(false) - .build(); + Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); commandLineOptions.addOption(maxFindingsOption); - Option infoTypesOption = Option.builder("infoTypes") - .hasArg(true) - .required(false) - .build(); + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); infoTypesOption.setArgs(Option.UNLIMITED_VALUES); commandLineOptions.addOption(infoTypesOption); - Option includeQuoteOption = Option.builder("includeQuote") - .hasArg(true) - .required(false) - .build(); + Option includeQuoteOption = Option.builder("includeQuote").hasArg(true).required(false).build(); commandLineOptions.addOption(includeQuoteOption); - Option bucketNameOption = Option.builder("bucketName") - .hasArg(true) - .required(false) - .build(); + Option bucketNameOption = Option.builder("bucketName").hasArg(true).required(false).build(); commandLineOptions.addOption(bucketNameOption); - Option gcsFileNameOption = Option.builder("fileName") - .hasArg(true) - .required(false) - .build(); + Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); commandLineOptions.addOption(gcsFileNameOption); - Option datastoreProjectIdOption = Option.builder("projectId") - .hasArg(true) - .required(false) - .build(); + Option datastoreProjectIdOption = + Option.builder("projectId").hasArg(true).required(false).build(); commandLineOptions.addOption(datastoreProjectIdOption); - Option datastoreNamespaceOption = Option.builder("namespace") - .hasArg(true) - .required(false) - .build(); + Option datastoreNamespaceOption = + Option.builder("namespace").hasArg(true).required(false).build(); commandLineOptions.addOption(datastoreNamespaceOption); - Option datastoreKindOption = Option.builder("kind") - .hasArg(true) - .required(false) - .build(); + Option datastoreKindOption = Option.builder("kind").hasArg(true).required(false).build(); commandLineOptions.addOption(datastoreKindOption); CommandLineParser parser = new DefaultParser(); @@ -406,11 +401,13 @@ public static void main(String[] args) throws Exception { return; } - Likelihood minLikelihood = Likelihood.valueOf(cmd.getOptionValue(minLikelihoodOption.getOpt(), - Likelihood.LIKELIHOOD_UNSPECIFIED.name())); + Likelihood minLikelihood = + Likelihood.valueOf( + cmd.getOptionValue( + minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); int maxFindings = Integer.parseInt(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); - boolean includeQuote = Boolean - .parseBoolean(cmd.getOptionValue(includeQuoteOption.getOpt(), "true")); + boolean includeQuote = + Boolean.parseBoolean(cmd.getOptionValue(includeQuoteOption.getOpt(), "true")); List infoTypesList = Collections.emptyList(); if (cmd.hasOption(infoTypesOption.getOpt())) { @@ -437,8 +434,9 @@ public static void main(String[] args) throws Exception { String namespaceId = cmd.getOptionValue(datastoreNamespaceOption.getOpt(), ""); String kind = cmd.getOptionValue(datastoreKindOption.getOpt()); // use default project id when project id is not specified - String projectId = cmd.getOptionValue(datastoreProjectIdOption.getOpt(), - ServiceOptions.getDefaultProjectId()); + String projectId = + cmd.getOptionValue( + datastoreProjectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); inspectDatastore(projectId, namespaceId, kind, minLikelihood, infoTypesList); } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java index 8045a22ef35..c6ffda065f6 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java @@ -1,10 +1,11 @@ /** - * Copyright 2017, Google, Inc. + * Copyright 2017 Google Inc. + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +21,7 @@ import com.google.privacy.dlp.v2beta1.InfoTypeDescription; import com.google.privacy.dlp.v2beta1.ListInfoTypesResponse; import com.google.privacy.dlp.v2beta1.ListRootCategoriesResponse; +import java.util.List; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; @@ -28,8 +30,6 @@ import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import java.util.List; - public class Metadata { private static void listInfoTypes(String category, String languageCode) throws Exception { @@ -54,8 +54,8 @@ private static void listRootCategories(String languageCode) throws Exception { try (DlpServiceClient dlpClient = DlpServiceClient.create()) { // The BCP-47 language code to use, e.g. 'en-US' // languageCode = 'en-US' - ListRootCategoriesResponse rootCategoriesResponse = dlpClient - .listRootCategories(languageCode); + ListRootCategoriesResponse rootCategoriesResponse = + dlpClient.listRootCategories(languageCode); for (CategoryDescription categoryDescription : rootCategoriesResponse.getCategoriesList()) { System.out.println("Name : " + categoryDescription.getName()); System.out.println("Display name : " + categoryDescription.getDisplayName()); @@ -64,6 +64,7 @@ private static void listRootCategories(String languageCode) throws Exception { // [END dlp_list_root_categories] } + /** Retrieve infoTypes. */ public static void main(String[] args) throws Exception { Options options = new Options(); Option languageCodeOption = new Option("language", null, true, "BCP-47 language code"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java new file mode 100644 index 00000000000..ff5f932ef8c --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java @@ -0,0 +1,100 @@ +/** + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.privacy.dlp.v2beta1.ContentItem; +import com.google.privacy.dlp.v2beta1.Finding; +import com.google.privacy.dlp.v2beta1.InfoType; +import com.google.privacy.dlp.v2beta1.InspectConfig; +import com.google.privacy.dlp.v2beta1.InspectContentRequest; +import com.google.privacy.dlp.v2beta1.InspectContentResponse; +import com.google.privacy.dlp.v2beta1.InspectResult; +import com.google.privacy.dlp.v2beta1.Likelihood; +import java.util.Arrays; +import java.util.List; + +// [START dlp_quickstart] +public class QuickStart { + + /** Quick start to DLP API : inspects a given string for an InfoType. */ + public static void main(String[] args) throws Exception { + + // string to inspect + String text = "Robert Frost"; + + // The minimum likelihood required before returning a match: + // LIKELIHOOD_UNSPECIFIED, VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, VERY_LIKELY, UNRECOGNIZED + Likelihood minLikelihood = Likelihood.VERY_LIKELY; + + // The maximum number of findings to report (0 = server maximum) + int maxFindings = 0; + + // The infoTypes of information to match + List infoTypes = + Arrays.asList( + InfoType.newBuilder().setName("US_MALE_NAME").build(), + InfoType.newBuilder().setName("US_FEMALE_NAME").build()); + + // Whether to include the matching string + boolean includeQuote = true; + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setMaxFindings(maxFindings) + .setIncludeQuote(includeQuote) + .build(); + + ContentItem contentItem = + ContentItem.newBuilder().setType("text/plain").setValue(text).build(); + + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addItems(contentItem) + .build(); + + // Inspect the text for info types + InspectContentResponse response = dlpServiceClient.inspectContent(request); + + // Print the response + for (InspectResult result : response.getResultsList()) { + if (result.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + if (includeQuote) { + System.out.print("Quote: " + finding.getQuote()); + } + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } + } catch (Exception e) { + System.out.println("Error in inspectString: " + e.getMessage()); + } + } +} + +// [END dlp_quickstart] diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java index 780c34dd3ff..8a332ca063e 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java @@ -1,5 +1,6 @@ /** - * Copyright 2017, Google, Inc. + * Copyright 2017 Google Inc. + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,61 +21,66 @@ import com.google.privacy.dlp.v2beta1.InfoType; import com.google.privacy.dlp.v2beta1.InspectConfig; import com.google.privacy.dlp.v2beta1.Likelihood; +import com.google.privacy.dlp.v2beta1.RedactContentRequest; +import com.google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig; import com.google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig; import com.google.privacy.dlp.v2beta1.RedactContentResponse; import com.google.protobuf.ByteString; +import java.io.FileOutputStream; +import java.net.URLConnection; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import javax.activation.MimetypesFileTypeMap; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - public class Redact { - private static void redactString(String string, String replacement, Likelihood minLikelihood, - List infoTypes) throws Exception { + private static void redactString( + String string, String replacement, Likelihood minLikelihood, List infoTypes) + throws Exception { // [START dlp_redact_string] // Instantiate the DLP client try (DlpServiceClient dlpClient = DlpServiceClient.create()) { // The minimum likelihood required before returning a match // eg.minLikelihood = LIKELIHOOD_VERY_LIKELY; - InspectConfig inspectConfig = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); - - ContentItem contentItem = ContentItem.newBuilder() - .setType("text/plain") - .setData(ByteString.copyFrom(string.getBytes())) - .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + + ContentItem contentItem = + ContentItem.newBuilder() + .setType("text/plain") + .setData(ByteString.copyFrom(string.getBytes())) + .build(); List replaceConfigs = new ArrayList<>(); if (infoTypes.isEmpty()) { // replace all detected sensitive elements with replacement string - replaceConfigs.add( - ReplaceConfig.newBuilder() - .setReplaceWith(replacement) - .build()); + replaceConfigs.add(ReplaceConfig.newBuilder().setReplaceWith(replacement).build()); } else { // Replace select info types with chosen replacement string for (InfoType infoType : infoTypes) { replaceConfigs.add( - ReplaceConfig.newBuilder() - .setInfoType(infoType) - .setReplaceWith(replacement) - .build()); + ReplaceConfig.newBuilder().setInfoType(infoType).setReplaceWith(replacement).build()); } } - RedactContentResponse contentResponse = dlpClient.redactContent( - inspectConfig, Collections.singletonList(contentItem), replaceConfigs); + RedactContentResponse contentResponse = + dlpClient.redactContent( + inspectConfig, Collections.singletonList(contentItem), replaceConfigs); for (ContentItem responseItem : contentResponse.getItemsList()) { // print out string with redacted content System.out.println(responseItem.getData().toStringUtf8()); @@ -83,37 +89,99 @@ private static void redactString(String string, String replacement, Likelihood m // [END dlp_redact_string] } - // Command line application to redact strings using the Data Loss Prevention API + private static void redactImage( + String filePath, Likelihood minLikelihood, List infoTypes, String outputPath) + throws Exception { + // [START dlp_redact_image] + // Instantiate the DLP client + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + // The path to a local file to inspect. Can be a JPG or PNG image file. + // filePath = 'path/to/image.png' + // detect file mime type, default to application/octet-stream + String mimeType = URLConnection.guessContentTypeFromName(filePath); + if (mimeType == null) { + mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); + } + if (mimeType == null) { + mimeType = "application/octet-stream"; + } + + byte[] data = Files.readAllBytes(Paths.get(filePath)); + + // The minimum likelihood required before redacting a match + // minLikelihood = 'LIKELIHOOD_UNSPECIFIED' + + // The infoTypes of information to redact + // infoTypes = [{ name: 'EMAIL_ADDRESS' }, { name: 'PHONE_NUMBER' }] + + // The local path to save the resulting image to. + // outputPath = 'result.png' + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + ContentItem contentItem = + ContentItem.newBuilder().setType(mimeType).setData(ByteString.copyFrom(data)).build(); + + List imageRedactionConfigs = new ArrayList<>(); + for (InfoType infoType : infoTypes) { + // clear the specific info type if detected in the image + // use .setRedactionColor to color detected info type without clearing + ImageRedactionConfig imageRedactionConfig = + ImageRedactionConfig.newBuilder().setInfoType(infoType).clearTarget().build(); + imageRedactionConfigs.add(imageRedactionConfig); + } + RedactContentRequest redactContentRequest = + RedactContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addAllImageRedactionConfigs(imageRedactionConfigs) + .addItems(contentItem) + .build(); + + RedactContentResponse contentResponse = dlpClient.redactContent(redactContentRequest); + for (ContentItem responseItem : contentResponse.getItemsList()) { + // redacted image data + ByteString redactedImageData = responseItem.getData(); + FileOutputStream outputStream = new FileOutputStream(outputPath); + outputStream.write(redactedImageData.toByteArray()); + outputStream.close(); + } + // [END dlp_redact_image] + } + } + + /** Command line application to redact strings, images using the Data Loss Prevention API. */ public static void main(String[] args) throws Exception { + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + Option stringOption = new Option("s", "string", true, "redact string"); + optionsGroup.addOption(stringOption); + + Option fileOption = new Option("f", "file path", true, "redact input file path"); + optionsGroup.addOption(fileOption); + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); - Option stringOption = Option.builder("s") - .longOpt("source string") - .hasArg(true) - .required(true) - .build(); - commandLineOptions.addOption(stringOption); - - Option replaceOption = Option.builder("r") - .longOpt("replace string") - .hasArg(true) - .required(true) - .build(); - commandLineOptions.addOption(replaceOption); + Option minLikelihoodOption = + Option.builder("minLikelihood").hasArg(true).required(false).build(); - Option minLikelihoodOption = Option.builder("minLikelihood") - .hasArg(true) - .required(false) - .build(); commandLineOptions.addOption(minLikelihoodOption); - Option infoTypesOption = Option.builder("infoTypes") - .hasArg(true) - .required(false) - .build(); + Option replaceOption = + Option.builder("r").longOpt("replace string").hasArg(true).required(false).build(); + commandLineOptions.addOption(replaceOption); + + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); infoTypesOption.setArgs(Option.UNLIMITED_VALUES); commandLineOptions.addOption(infoTypesOption); + Option outputFilePathOption = + Option.builder("o").hasArg(true).longOpt("outputFilePath").required(false).build(); + commandLineOptions.addOption(outputFilePathOption); + CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; @@ -127,8 +195,7 @@ public static void main(String[] args) throws Exception { return; } - String source = cmd.getOptionValue(stringOption.getOpt()); - String replacement = cmd.getOptionValue(replaceOption.getOpt()); + String replacement = cmd.getOptionValue(replaceOption.getOpt(), "_REDACTED_"); List infoTypesList = new ArrayList<>(); String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); @@ -137,6 +204,19 @@ public static void main(String[] args) throws Exception { infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); } } - redactString(source, replacement, Likelihood.LIKELIHOOD_UNSPECIFIED, infoTypesList); + Likelihood minLikelihood = + Likelihood.valueOf( + cmd.getOptionValue( + minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); + + // string inspection + if (cmd.hasOption("s")) { + String source = cmd.getOptionValue(stringOption.getOpt()); + redactString(source, replacement, minLikelihood, infoTypesList); + } else if (cmd.hasOption("f")) { + String filePath = cmd.getOptionValue(fileOption.getOpt()); + String outputFilePath = cmd.getOptionValue(outputFilePathOption.getOpt()); + redactImage(filePath, minLikelihood, infoTypesList, outputFilePath); + } } } diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index fff56b734b0..fbeb536bd5f 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -1,32 +1,34 @@ /** - * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You may obtain a copy of the License - * at + * Copyright 2017 Google Inc. * - *

http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and * limitations under the License. */ + package com.example.dlp; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.PrintStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.PrintStream; - @RunWith(JUnit4.class) -@SuppressWarnings("checkstyle:abbreviationaswordinname") public class InspectIT { private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java index ebd0d1a2e9e..044d534dbaa 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java @@ -1,31 +1,33 @@ /** - * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You may obtain a copy of the License - * at + * Copyright 2017 Google Inc. * - *

http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and * limitations under the License. */ + package com.example.dlp; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - @RunWith(JUnit4.class) -@SuppressWarnings("checkstyle:abbreviationaswordinname") public class MetadataIT { private ByteArrayOutputStream bout; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java new file mode 100644 index 00000000000..9b156f1f87a --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java @@ -0,0 +1,55 @@ +/** + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class QuickStartIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @Test + public void testQuickStart() throws Exception { + QuickStart.main(new String[] {}); + String output = bout.toString(); + assertTrue(output.contains("US_MALE_NAME")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java index 6e768a1cedf..d93c097ead3 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java @@ -1,31 +1,35 @@ /** - * Copyright 2017, Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You may obtain a copy of the License - * at + * Copyright 2017 Google Inc. * - *

http://www.apache.org/licenses/LICENSE-2.0 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - *

Unless required by applicable law or agreed to in writing, software distributed under the - * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing permissions and + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and * limitations under the License. */ + package com.example.dlp; +import static junit.framework.TestCase.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.PrintStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - @RunWith(JUnit4.class) -@SuppressWarnings("checkstyle:abbreviationaswordinname") public class RedactIT { private ByteArrayOutputStream bout; private PrintStream out; @@ -47,6 +51,29 @@ public void testInfoTypesInStringAreReplaced() throws Exception { assertTrue(output.contains("My phone number is _REDACTED_ and my email address is _REDACTED_")); } + @Test + public void testInfoTypesInImageAreReplaced() throws Exception { + ClassLoader classLoader = getClass().getClassLoader(); + // confirm that current data contains info types + File file = new File(classLoader.getResource("test.png").getFile()); + Inspect.main(new String[] {"-f", file.getAbsolutePath()}); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + bout.reset(); + + String outputFilePath = "output.png"; + + Redact.main( + new String[] { + "-f", file.getAbsolutePath(), "-infoTypes", "PHONE_NUMBER", "-o", outputFilePath + }); + Inspect.main(new String[] {"-f", outputFilePath}); + output = bout.toString(); + assertFalse(output.contains("PHONE_NUMBER")); + assertTrue(output.contains("EMAIL_ADDRESS")); + } + @After public void tearDown() { System.setOut(null); From 8ed7cd754ef8f3c6517bfcb58458f1667beae48f Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Thu, 10 Aug 2017 12:46:21 -0700 Subject: [PATCH 032/406] samples: upgrade Guava (#802) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * upgrade Guava * turn off APIary Logging testing * Turn off IAP sample for testing Also up version to 22 for guava on Storage-Transfer * Roll back to Guava 20.0; truth 0.30 Need to investigate this more. * DLP & Vision 1. DLP doesn’t currently support Google Default Auth 2. vision has gotten a bit more accurate on our sample * Skip broken test 1. Skip broken vision test 2. Simplify “San Francisco” to “Francisco” * shellcheck fix --- .../snippets/src/test/java/com/example/dlp/InspectIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index fbeb536bd5f..788236a72fb 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -44,7 +44,7 @@ public class InspectIT { public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); - System.setOut(out); + System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); } From 6140b6ebcb0020c4c0705ca426ab12a72cd85803 Mon Sep 17 00:00:00 2001 From: Jisha Abubaker Date: Fri, 25 Aug 2017 14:58:06 -0700 Subject: [PATCH 033/406] samples: patching dlp test (#829) * patching dlp test * typo fix --- .../snippets/src/test/java/com/example/dlp/MetadataIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java index 044d534dbaa..227ee51caf4 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java @@ -53,7 +53,7 @@ public void testRootCategoriesAreRetrieved() throws Exception { public void testInfoTypesAreRetrieved() throws Exception { Metadata.main(new String[] {"-category", "GOVERNMENT"}); String output = bout.toString(); - assertTrue(output.contains("AUSTRALIA_TAX_FILE_NUMBER")); + assertTrue(output.contains("Name") && output.contains("Display name")); } @After From 5c11dea3f4047ba0d716a50396fa729563f453b4 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Thu, 19 Oct 2017 09:51:34 -0700 Subject: [PATCH 034/406] samples: Add new DLP samples (Bigquery, DeID, Risk Analysis) (#841) --- .../com/example/dlp/DeIdentification.java | 274 ++++++++++ .../main/java/com/example/dlp/Inspect.java | 106 +++- .../java/com/example/dlp/RiskAnalysis.java | 474 ++++++++++++++++++ .../com/example/dlp/DeIdentificationIT.java | 84 ++++ .../test/java/com/example/dlp/InspectIT.java | 13 +- .../java/com/example/dlp/RiskAnalysisIT.java | 108 ++++ 6 files changed, 1054 insertions(+), 5 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java new file mode 100644 index 00000000000..296fc582f78 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -0,0 +1,274 @@ +/** + * Copyright 2017 Google Inc. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2beta1.CharacterMaskConfig; +import com.google.privacy.dlp.v2beta1.ContentItem; +import com.google.privacy.dlp.v2beta1.CryptoKey; +import com.google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2beta1.DeidentifyConfig; +import com.google.privacy.dlp.v2beta1.DeidentifyContentRequest; +import com.google.privacy.dlp.v2beta1.DeidentifyContentResponse; +import com.google.privacy.dlp.v2beta1.InfoTypeTransformations; +import com.google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2beta1.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2beta1.PrimitiveTransformation; +import com.google.protobuf.ByteString; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class DeIdentification { + + private static void deIdentifyWithMask( + String string, + Character maskingCharacter, + int numberToMask) { + // [START dlp_deidentify_mask] + /** + * Deidentify a string by masking sensitive information with a character using the DLP API. + * @param string The string to deidentify. + * @param maskingCharacter (Optional) The character to mask sensitive data with. + * @param numberToMask (Optional) The number of characters' worth of sensitive data to mask. + * Omitting this value or setting it to 0 masks all sensitive chars. + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // string = "My SSN is 372819127"; + // numberToMask = 5; + // maskingCharacter = 'x'; + + ContentItem contentItem = + ContentItem.newBuilder() + .setType("text/plain") + .setValue(string) + .build(); + + CharacterMaskConfig characterMaskConfig = + CharacterMaskConfig.newBuilder() + .setMaskingCharacter(maskingCharacter.toString()) + .setNumberToMask(numberToMask) + .build(); + + // Create the deidentification transformation configuration + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCharacterMaskConfig(characterMaskConfig) + .build(); + + InfoTypeTransformation infoTypeTransformationObject = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + + InfoTypeTransformations infoTypeTransformationArray = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformationObject) + .build(); + + // Create the deidentification request object + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(infoTypeTransformationArray) + .build(); + + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setDeidentifyConfig(deidentifyConfig) + .addItems(contentItem) + .build(); + + // Execute the deidentification request + DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); + + // Print the character-masked input value + // e.g. "My SSN is 123456789" --> "My SSN is *********" + for (ContentItem item : response.getItemsList()) { + System.out.println(item.getValue()); + } + } catch (Exception e) { + System.out.println("Error in deidentifyWithMask: " + e.getMessage()); + } + // [END dlp_deidentify_mask] + } + + private static void deIdentifyWithFpe( + String string, FfxCommonNativeAlphabet alphabet, String keyName, String wrappedKey) { + // [START dlp_deidentify_fpe] + /** + * Deidentify a string by encrypting sensitive information while preserving format. + * @param string The string to deidentify. + * @param alphabet The set of characters to use when encrypting the input. For more information, + * see cloud.google.com/dlp/docs/reference/rest/v2beta1/content/deidentify + * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. + * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // string = "My SSN is 372819127"; + // alphabet = FfxCommonNativeAlphabet.ALPHA_NUMERIC; + // keyName = "projects/GCP_PROJECT/locations/REGION/keyRings/KEYRING_ID/cryptoKeys/KEY_NAME"; + // wrappedKey = "YOUR_ENCRYPTED_AES_256_KEY" + + ContentItem contentItem = + ContentItem.newBuilder() + .setType("text/plain") + .setValue(string) + .build(); + + // Create the format-preserving encryption (FPE) configuration + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) + .setCryptoKeyName(keyName) + .build(); + + CryptoKey cryptoKey = + CryptoKey.newBuilder() + .setKmsWrapped(kmsWrappedCryptoKey) + .build(); + + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + .setCommonAlphabet(alphabet) + .build(); + + // Create the deidentification transformation configuration + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + + InfoTypeTransformation infoTypeTransformationObject = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + + InfoTypeTransformations infoTypeTransformationArray = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformationObject) + .build(); + + // Create the deidentification request object + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(infoTypeTransformationArray) + .build(); + + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setDeidentifyConfig(deidentifyConfig) + .addItems(contentItem) + .build(); + + // Execute the deidentification request + DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); + + // Print the deidentified input value + // e.g. "My SSN is 123456789" --> "My SSN is 7261298621" + for (ContentItem item : response.getItemsList()) { + System.out.println(item.getValue()); + } + } catch (Exception e) { + System.out.println("Error in deidentifyWithFpe: " + e.getMessage()); + } + // [END dlp_deidentify_fpe] + } + + /** + * Command line application to de-identify data using the Data Loss Prevention API. + * Supported data format: strings + */ + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + + Option deidentifyMaskingOption = new Option("m", "mask", true, "deid with character masking"); + optionsGroup.addOption(deidentifyMaskingOption); + + Option deidentifyFpeOption = new Option("f", "fpe", true, "deid with FFX FPE"); + optionsGroup.addOption(deidentifyFpeOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option maskingCharacterOption = + Option.builder("maskingCharacter").hasArg(true).required(false).build(); + commandLineOptions.addOption(maskingCharacterOption); + + Option numberToMaskOption = + Option.builder("numberToMask").hasArg(true).required(false).build(); + commandLineOptions.addOption(numberToMaskOption); + + Option alphabetOption = + Option.builder("commonAlphabet").hasArg(true).required(false).build(); + commandLineOptions.addOption(alphabetOption); + + Option wrappedKeyOption = + Option.builder("wrappedKey").hasArg(true).required(false).build(); + commandLineOptions.addOption(wrappedKeyOption); + + Option keyNameOption = + Option.builder("keyName").hasArg(true).required(false).build(); + commandLineOptions.addOption(keyNameOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(DeIdentification.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + if (cmd.hasOption("m")) { + // deidentification with character masking + int numberToMask = Integer.parseInt(cmd.getOptionValue(numberToMaskOption.getOpt(), "0")); + char maskingCharacter = cmd.getOptionValue(maskingCharacterOption.getOpt(), "*").charAt(0); + String val = cmd.getOptionValue(deidentifyMaskingOption.getOpt()); + deIdentifyWithMask(val, maskingCharacter, numberToMask); + } else if (cmd.hasOption("f")) { + // deidentification with FPE + String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); + String keyName = cmd.getOptionValue(keyNameOption.getOpt()); + String val = cmd.getOptionValue(deidentifyFpeOption.getOpt()); + FfxCommonNativeAlphabet alphabet = + FfxCommonNativeAlphabet.valueOf( + cmd.getOptionValue( + alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); + deIdentifyWithFpe(val, alphabet, keyName, wrappedKey); + } + } +} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 03e3b616b09..b39be30adc7 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -20,6 +20,8 @@ import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2beta1.DlpServiceClient; import com.google.longrunning.Operation; +import com.google.privacy.dlp.v2beta1.BigQueryOptions; +import com.google.privacy.dlp.v2beta1.BigQueryTable; import com.google.privacy.dlp.v2beta1.CloudStorageOptions; import com.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet; import com.google.privacy.dlp.v2beta1.ContentItem; @@ -332,9 +334,88 @@ private static void inspectDatastore( // [END dlp_inspect_datastore] } + private static void inspectBigquery( + String projectId, + String datasetId, + String tableId, + Likelihood minLikelihood, + List infoTypes) { + // [START dlp_inspect_bigquery] + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // (Optional) The project ID to run the API call under + // projectId = my-project-id + + // The ID of the dataset to inspect, e.g. 'my_dataset' + // datasetId = "my_dataset"; + + // The ID of the table to inspect, e.g. 'my_table' + // tableId = "my_table"; + + // The minimum likelihood required before returning a match + // minLikelihood = LIKELIHOOD_UNSPECIFIED; + + // The infoTypes of information to match + // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; + + // Reference to the BigQuery table + BigQueryTable tableReference = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + BigQueryOptions bigQueryOptions = + BigQueryOptions.newBuilder() + .setTableReference(tableReference) + .build(); + + // Construct BigQuery configuration to be inspected + StorageConfig storageConfig = + StorageConfig.newBuilder() + .setBigQueryOptions(bigQueryOptions) + .build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .build(); + + // optionally provide an output configuration to store results, default : none + OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); + + // asynchronously submit an inspect operation + OperationFuture responseFuture = + dlpServiceClient.createInspectOperationAsync( + inspectConfig, storageConfig, outputConfig); + + // ... + // block on response, returning job id of the operation + InspectOperationResult inspectOperationResult = responseFuture.get(); + ResultName resultName = inspectOperationResult.getNameAsResultName(); + InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); + + if (inspectResult.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : inspectResult.getFindingsList()) { + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); + } + } else { + System.out.println("No findings."); + } + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Error in inspectBigguery: " + e.getMessage()); + } + // [END dlp_inspect_bigquery] + } + /** * Command line application to inspect data using the Data Loss Prevention API. - * Supported data formats : string, file, text files on GCS and Datastore entities + * Supported data formats: string, file, text file on GCS, BigQuery table, and Datastore entity */ public static void main(String[] args) throws Exception { @@ -352,6 +433,9 @@ public static void main(String[] args) throws Exception { Option datastoreOption = new Option("ds", "Google Datastore", false, "inspect Datastore kind"); optionsGroup.addOption(datastoreOption); + Option bigqueryOption = new Option("bq", "Google BigQuery", false, "inspect BigQuery table"); + optionsGroup.addOption(bigqueryOption); + Options commandLineOptions = new Options(); commandLineOptions.addOptionGroup(optionsGroup); @@ -377,9 +461,15 @@ public static void main(String[] args) throws Exception { Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); commandLineOptions.addOption(gcsFileNameOption); - Option datastoreProjectIdOption = + Option datasetIdOption = Option.builder("datasetId").hasArg(true).required(false).build(); + commandLineOptions.addOption(datasetIdOption); + + Option tableIdOption = Option.builder("tableId").hasArg(true).required(false).build(); + commandLineOptions.addOption(tableIdOption); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(datastoreProjectIdOption); + commandLineOptions.addOption(projectIdOption); Option datastoreNamespaceOption = Option.builder("namespace").hasArg(true).required(false).build(); @@ -436,8 +526,16 @@ public static void main(String[] args) throws Exception { // use default project id when project id is not specified String projectId = cmd.getOptionValue( - datastoreProjectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); inspectDatastore(projectId, namespaceId, kind, minLikelihood, infoTypesList); + } else if (cmd.hasOption("bq")) { + String datasetId = cmd.getOptionValue(datasetIdOption.getOpt()); + String tableId = cmd.getOptionValue(tableIdOption.getOpt()); + // use default project id when project id is not specified + String projectId = + cmd.getOptionValue( + projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + inspectBigquery(projectId, datasetId, tableId, minLikelihood, infoTypesList); } } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java new file mode 100644 index 00000000000..5fc95bdec86 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -0,0 +1,474 @@ +/** + * Copyright 2017 Google Inc. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.api.gax.rpc.OperationFuture; +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.longrunning.Operation; +import com.google.privacy.dlp.v2beta1.AnalyzeDataSourceRiskRequest; +import com.google.privacy.dlp.v2beta1.BigQueryTable; +import com.google.privacy.dlp.v2beta1.FieldId; +import com.google.privacy.dlp.v2beta1.PrivacyMetric; +import com.google.privacy.dlp.v2beta1.PrivacyMetric.CategoricalStatsConfig; +import com.google.privacy.dlp.v2beta1.PrivacyMetric.KAnonymityConfig; +import com.google.privacy.dlp.v2beta1.PrivacyMetric.LDiversityConfig; +import com.google.privacy.dlp.v2beta1.PrivacyMetric.NumericalStatsConfig; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationMetadata; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket; +import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.NumericalStatsResult; +import com.google.privacy.dlp.v2beta1.Value; +import com.google.privacy.dlp.v2beta1.ValueFrequency; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class RiskAnalysis { + + private static void calculateNumericalStats( + String projectId, String datasetId, String tableId, String columnName) + throws Exception { + // [START dlp_numerical_stats_analysis] + + /** + * Calculate numerical statistics for a column in a BigQuery table using the DLP API. + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param columnName The name of the column to analyze, which must contain only numerical data. + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // projectId = process.env.GCLOUD_PROJECT; + // datasetId = "my_dataset"; + // tableId = "my_table"; + // columnName = "firstName"; + + FieldId fieldId = + FieldId.newBuilder() + .setColumnName(columnName) + .build(); + + NumericalStatsConfig numericalStatsConfig = + NumericalStatsConfig.newBuilder() + .setField(fieldId) + .build(); + + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder() + .setNumericalStatsConfig(numericalStatsConfig) + .build(); + + AnalyzeDataSourceRiskRequest request = + AnalyzeDataSourceRiskRequest.newBuilder() + .setPrivacyMetric(privacyMetric) + .setSourceTable(bigQueryTable) + .build(); + + // asynchronously submit a risk analysis operation + OperationFuture + responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); + + // ... + // block on response + RiskAnalysisOperationResult response = responseFuture.get(); + NumericalStatsResult results = + response.getNumericalStatsResult(); + + System.out.println( + "Value range: [" + results.getMaxValue() + ", " + results.getMinValue() + "]"); + + // Print out unique quantiles + String previousValue = ""; + for (int i = 0; i < results.getQuantileValuesCount(); i++) { + Value valueObj = results.getQuantileValues(i); + String value = valueObj.toString(); + + if (!previousValue.equals(value)) { + System.out.println("Value at " + i + "% quantile: " + value.toString()); + previousValue = value; + } + } + } catch (Exception e) { + System.out.println("Error in numericalStatsAnalysis: " + e.getMessage()); + } + // [END dlp_numerical_stats_analysis] + } + + private static void calculateCategoricalStats( + String projectId, String datasetId, String tableId, String columnName) + throws Exception { + // [START dlp_categorical_stats_analysis] + /** + * Calculate categorical statistics for a column in a BigQuery table using the DLP API. + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param columnName The name of the column to analyze, which need not contain numerical data. + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // projectId = process.env.GCLOUD_PROJECT; + // datasetId = "my_dataset"; + // tableId = "my_table"; + // columnName = "firstName"; + + FieldId fieldId = + FieldId.newBuilder() + .setColumnName(columnName) + .build(); + + CategoricalStatsConfig categoricalStatsConfig = + CategoricalStatsConfig.newBuilder() + .setField(fieldId) + .build(); + + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder() + .setCategoricalStatsConfig(categoricalStatsConfig) + .build(); + + AnalyzeDataSourceRiskRequest request = + AnalyzeDataSourceRiskRequest.newBuilder() + .setPrivacyMetric(privacyMetric) + .setSourceTable(bigQueryTable) + .build(); + + // asynchronously submit a risk analysis operation + OperationFuture + responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); + + // ... + // block on response + RiskAnalysisOperationResult response = responseFuture.get(); + CategoricalStatsHistogramBucket results = + response.getCategoricalStatsResult().getValueFrequencyHistogramBuckets(0); + + System.out.println( + "Most common value occurs " + results.getValueFrequencyUpperBound() + " time(s)"); + System.out.println( + "Least common value occurs " + results.getValueFrequencyLowerBound() + " time(s)"); + + for (ValueFrequency valueFrequency : results.getBucketValuesList()) { + System.out.println("Value " + + valueFrequency.getValue().toString() + + " occurs " + + valueFrequency.getCount() + + " time(s)." + ); + } + + } catch (Exception e) { + System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); + } + // [END dlp_categorical_stats_analysis] + } + + private static void calculateKAnonymity( + String projectId, String datasetId, String tableId, List quasiIds) + throws Exception { + // [START dlp_k_anonymity] + /** + * Calculate k-anonymity for quasi-identifiers in a BigQuery table using the DLP API. + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param quasiIds The names of columns that form a composite key ('quasi-identifiers'). + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // projectId = process.env.GCLOUD_PROJECT; + // datasetId = 'my_dataset'; + // tableId = 'my_table'; + // quasiIds = [{ columnName: 'age' }, { columnName: 'city' }]; + + List quasiIdFields = + quasiIds + .stream() + .map(columnName -> FieldId.newBuilder().setColumnName(columnName).build()) + .collect(Collectors.toList()); + + KAnonymityConfig kanonymityConfig = + KAnonymityConfig.newBuilder() + .addAllQuasiIds(quasiIdFields) + .build(); + + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder() + .setKAnonymityConfig(kanonymityConfig) + .build(); + + AnalyzeDataSourceRiskRequest request = + AnalyzeDataSourceRiskRequest.newBuilder() + .setPrivacyMetric(privacyMetric) + .setSourceTable(bigQueryTable) + .build(); + + // asynchronously submit a risk analysis operation + OperationFuture + responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); + + // ... + // block on response + RiskAnalysisOperationResult response = responseFuture.get(); + KAnonymityHistogramBucket results = + response.getKAnonymityResult().getEquivalenceClassHistogramBuckets(0); + + System.out.println("Bucket size range: [" + + results.getEquivalenceClassSizeLowerBound() + + ", " + + results.getEquivalenceClassSizeUpperBound() + + "]" + ); + + for (KAnonymityEquivalenceClass bucket : results.getBucketValuesList()) { + List quasiIdValues = bucket.getQuasiIdsValuesList() + .stream() + .map(v -> v.toString()) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + } + } catch (Exception e) { + System.out.println("Error in kAnonymityAnalysis: " + e.getMessage()); + } + // [END dlp_k_anonymity] + } + + private static void calculateLDiversity( + String projectId, + String datasetId, + String tableId, + String sensitiveAttribute, + List quasiIds + ) throws Exception { + // [START dlp_l_diversity] + /** + * Calculate l-diversity for an attribute relative to quasi-identifiers in a BigQuery table. + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param sensitiveAttribute The name of the attribute to compare the quasi-ID against + * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). + */ + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // projectId = process.env.GCLOUD_PROJECT; + // datasetId = "my_dataset"; + // tableId = "my_table"; + // sensitiveAttribute = "name"; + // quasiIds = [{ columnName: "age" }, { columnName: "city" }]; + + FieldId sensitiveAttributeField = + FieldId.newBuilder() + .setColumnName(sensitiveAttribute) + .build(); + + List quasiIdFields = + quasiIds + .stream() + .map(columnName -> FieldId.newBuilder().setColumnName(columnName).build()) + .collect(Collectors.toList()); + + LDiversityConfig ldiversityConfig = + LDiversityConfig.newBuilder() + .addAllQuasiIds(quasiIdFields) + .setSensitiveAttribute(sensitiveAttributeField) + .build(); + + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder() + .setLDiversityConfig(ldiversityConfig) + .build(); + + AnalyzeDataSourceRiskRequest request = + AnalyzeDataSourceRiskRequest.newBuilder() + .setPrivacyMetric(privacyMetric) + .setSourceTable(bigQueryTable) + .build(); + + // asynchronously submit a risk analysis operation + OperationFuture + responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); + + // ... + // block on response + RiskAnalysisOperationResult response = responseFuture.get(); + LDiversityHistogramBucket results = + response.getLDiversityResult().getSensitiveValueFrequencyHistogramBuckets(0); + + for (LDiversityEquivalenceClass bucket : results.getBucketValuesList()) { + List quasiIdValues = bucket.getQuasiIdsValuesList() + .stream() + .map(v -> v.toString()) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + + for (ValueFrequency valueFrequency : bucket.getTopSensitiveValuesList()) { + System.out.println("\t\tSensitive value " + + valueFrequency.getValue().toString() + + " occurs " + + valueFrequency.getCount() + + " time(s)."); + } + } + } catch (Exception e) { + System.out.println("Error in lDiversityAnalysis: " + e.getMessage()); + } + // [END dlp_l_diversity] + } + + + /** + * Command line application to perform risk analysis using the Data Loss Prevention API. + * Supported data format: BigQuery tables + */ + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + + Option numericalAnalysisOption = new Option("n", "numerical"); + optionsGroup.addOption(numericalAnalysisOption); + + Option categoricalAnalysisOption = new Option("c", "categorical"); + optionsGroup.addOption(categoricalAnalysisOption); + + Option kanonymityOption = new Option("k", "kAnonymity"); + optionsGroup.addOption(kanonymityOption); + + Option ldiversityOption = new Option("l", "lDiversity"); + optionsGroup.addOption(ldiversityOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option datasetIdOption = Option.builder("datasetId").hasArg(true).required(false).build(); + commandLineOptions.addOption(datasetIdOption); + + Option tableIdOption = Option.builder("tableId").hasArg(true).required(false).build(); + commandLineOptions.addOption(tableIdOption); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); + commandLineOptions.addOption(projectIdOption); + + Option columnNameOption = + Option.builder("columnName").hasArg(true).required(false).build(); + commandLineOptions.addOption(columnNameOption); + + Option sensitiveAttributeOption = + Option.builder("sensitiveAttribute").hasArg(true).required(false).build(); + commandLineOptions.addOption(sensitiveAttributeOption); + + Option quasiIdColumnNamesOption = + Option.builder("quasiIdColumnNames").hasArg(true).required(false).build(); + commandLineOptions.addOption(quasiIdColumnNamesOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(RiskAnalysis.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + String datasetId = cmd.getOptionValue(datasetIdOption.getOpt()); + String tableId = cmd.getOptionValue(tableIdOption.getOpt()); + // use default project id when project id is not specified + String projectId = + cmd.getOptionValue( + projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + + if (cmd.hasOption("n")) { + // numerical stats analysis + String columnName = cmd.getOptionValue(columnNameOption.getOpt()); + calculateNumericalStats(projectId, datasetId, tableId, columnName); + } else if (cmd.hasOption("c")) { + // categorical stats analysis + String columnName = cmd.getOptionValue(columnNameOption.getOpt()); + calculateCategoricalStats(projectId, datasetId, tableId, columnName); + } else if (cmd.hasOption("k")) { + // k-anonymity analysis + List quasiIdColumnNames = + Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); + calculateKAnonymity(projectId, datasetId, tableId, quasiIdColumnNames); + } else if (cmd.hasOption("l")) { + // l-diversity analysis + String sensitiveAttribute = cmd.getOptionValue(sensitiveAttributeOption.getOpt()); + List quasiIdColumnNames = + Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); + calculateLDiversity(projectId, datasetId, tableId, sensitiveAttribute, quasiIdColumnNames); + } + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java new file mode 100644 index 00000000000..0097cee5af1 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java @@ -0,0 +1,84 @@ +/** + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class DeIdentificationIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + // Update to wrapped local encryption key + private String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); + + // Update to name of KMS key used to wrap local encryption key + private String keyName = System.getenv("DLP_DEID_KEY_NAME"); + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); + assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); + } + + @Test + public void testDeidStringMasksCharacters() throws Exception { + String text = "\"My SSN is 372819127\""; + DeIdentification.main(new String[] { + "-m", text, + "-maskingCharacter", "x", + "-numberToMask", "5" + }); + String output = bout.toString(); + assertEquals(output, "My SSN is xxxxx9127\n"); + } + + @Test + public void testDeidStringPerformsFpe() throws Exception { + String text = "\"My SSN is 372819127\""; + DeIdentification.main(new String[] { + "-f", text, + "-wrappedKey", wrappedKey, + "-keyName", keyName + }); + String output = bout.toString(); + assertFalse(output.contains(text)); + assertTrue(Pattern.compile("My SSN is \\w+").matcher(output).find()); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 788236a72fb..618c96d0a5c 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -87,7 +87,7 @@ public void testGcsFileInspectionReturnsInfoTypes() throws Exception { assertTrue(output.contains("EMAIL_ADDRESS")); } - // Requires a Datastore kind containing an entity + // Requires a Datastore kind containing an entity // with phone number and email address properties. @Test public void testDatastoreInspectionReturnsInfoTypes() throws Exception { @@ -97,6 +97,17 @@ public void testDatastoreInspectionReturnsInfoTypes() throws Exception { assertTrue(output.contains("EMAIL_ADDRESS")); } + @Test + public void testBigqueryInspectionReturnsInfoTypes() throws Exception { + Inspect.main(new String[] { + "-bq", + "-datasetId", "integration_tests_dlp", + "-tableId", "harmful" + }); + String output = bout.toString(); + assertTrue(output.contains("PHONE_NUMBER")); + } + @After public void tearDown() { System.setOut(null); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java new file mode 100644 index 00000000000..de5fa22c722 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java @@ -0,0 +1,108 @@ +/** + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class RiskAnalysisIT { + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); + assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); + } + + @Test + public void testNumericalStats() throws Exception { + RiskAnalysis.main(new String[] { + "-n", + "-datasetId", "integration_tests_dlp", + "-tableId", "harmful", + "-columnName", "Age" + }); + String output = bout.toString(); + assertTrue(Pattern.compile( + "Value at 0% quantile: integer_value: \\d{2}").matcher(output).find()); + assertTrue(Pattern.compile( + "Value at \\d{2}% quantile: integer_value: \\d{2}").matcher(output).find()); + } + + @Test + public void testCategoricalStats() throws Exception { + RiskAnalysis.main(new String[] { + "-c", + "-datasetId", "integration_tests_dlp", + "-tableId", "harmful", + "-columnName", "Mystery" + }); + String output = bout.toString(); + assertTrue(Pattern.compile( + "Most common value occurs \\d time\\(s\\)").matcher(output).find()); + } + + @Test + public void testKAnonymity() throws Exception { + RiskAnalysis.main(new String[] { + "-k", + "-datasetId", "integration_tests_dlp", + "-tableId", "harmful", + "-quasiIdColumnNames", "Age", "Mystery" + }); + String output = bout.toString(); + assertTrue(Pattern.compile("Bucket size range: \\[\\d, \\d\\]").matcher(output).find()); + assertTrue(output.contains("Quasi-ID values: integer_value: 19")); + assertTrue(output.contains("Class size: 1")); + } + + @Test + public void testLDiversity() throws Exception { + RiskAnalysis.main(new String[] { + "-l", + "-datasetId", "integration_tests_dlp", + "-tableId", "harmful", + "-sensitiveAttribute", "Name", + "-quasiIdColumnNames", "Age", "Mystery" + }); + String output = bout.toString(); + assertTrue(output.contains("Quasi-ID values: integer_value: 19")); + assertTrue(output.contains("Class size: 1")); + assertTrue(output.contains("Sensitive value string_value: \"James\"")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } +} From d82463122a57edc0caad64b4c51dc0918313d6a8 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Wed, 15 Nov 2017 11:42:18 -0800 Subject: [PATCH 035/406] samples: Auto-update dependencies. (#912) * Auto-update dependencies. * Reverted Vision API classes. * Fixed OperationalFuture references. * Fixed some more Vision classes back. * Fixed some more classes. --- .../src/main/java/com/example/dlp/Inspect.java | 8 ++++---- .../src/main/java/com/example/dlp/RiskAnalysis.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index b39be30adc7..28c958d0fcb 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -16,7 +16,7 @@ package com.example.dlp; -import com.google.api.gax.rpc.OperationFuture; +import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2beta1.DlpServiceClient; import com.google.longrunning.Operation; @@ -235,7 +235,7 @@ private static void inspectGcsFile( OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); // asynchronously submit an inspect operation - OperationFuture responseFuture = + OperationFuture responseFuture = dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); // ... @@ -309,7 +309,7 @@ private static void inspectDatastore( OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); // asynchronously submit an inspect operation - OperationFuture responseFuture = + OperationFuture responseFuture = dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); // ... @@ -387,7 +387,7 @@ private static void inspectBigquery( OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); // asynchronously submit an inspect operation - OperationFuture responseFuture = + OperationFuture responseFuture = dlpServiceClient.createInspectOperationAsync( inspectConfig, storageConfig, outputConfig); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java index 5fc95bdec86..89cb840f2d0 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -16,7 +16,7 @@ package com.example.dlp; -import com.google.api.gax.rpc.OperationFuture; +import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2beta1.DlpServiceClient; import com.google.longrunning.Operation; @@ -102,7 +102,7 @@ private static void calculateNumericalStats( .build(); // asynchronously submit a risk analysis operation - OperationFuture + OperationFuture responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); // ... @@ -180,7 +180,7 @@ private static void calculateCategoricalStats( .build(); // asynchronously submit a risk analysis operation - OperationFuture + OperationFuture responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); // ... @@ -259,7 +259,7 @@ private static void calculateKAnonymity( .build(); // asynchronously submit a risk analysis operation - OperationFuture + OperationFuture responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); // ... @@ -352,7 +352,7 @@ private static void calculateLDiversity( .build(); // asynchronously submit a risk analysis operation - OperationFuture + OperationFuture responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); // ... From d8a887aa5ffd284ddab68348229bf385b4da3f6b Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 22 Nov 2017 09:50:53 -0800 Subject: [PATCH 036/406] samples: Added ignore for dlp tests due to known issues. --- .../snippets/src/test/java/com/example/dlp/InspectIT.java | 2 ++ .../snippets/src/test/java/com/example/dlp/RedactIT.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 618c96d0a5c..7f598acdb49 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -24,6 +24,7 @@ import java.io.PrintStream; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -68,6 +69,7 @@ public void testTextFileInspectionReturnsInfoTypes() throws Exception { assertTrue(output.contains("EMAIL_ADDRESS")); } + @Ignore // TODO: b/69461298 @Test public void testImageFileInspectionReturnsInfoTypes() throws Exception { ClassLoader classLoader = getClass().getClassLoader(); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java index d93c097ead3..556e7e16f63 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java @@ -25,6 +25,7 @@ import java.io.PrintStream; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -51,6 +52,7 @@ public void testInfoTypesInStringAreReplaced() throws Exception { assertTrue(output.contains("My phone number is _REDACTED_ and my email address is _REDACTED_")); } + @Ignore // TODO: b/69461298 @Test public void testInfoTypesInImageAreReplaced() throws Exception { ClassLoader classLoader = getClass().getClassLoader(); From 63c365f35b9b7cd0b598c04e98f31a8699452dfc Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 15 Dec 2017 10:22:52 -0800 Subject: [PATCH 037/406] samples: Auto-update dependencies. (#947) * Auto-update dependencies. * Updated dlp-samples. --- .../snippets/src/main/java/com/example/dlp/Redact.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java index 8a332ca063e..d775ed61ca4 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java @@ -78,9 +78,13 @@ private static void redactString( } } - RedactContentResponse contentResponse = - dlpClient.redactContent( - inspectConfig, Collections.singletonList(contentItem), replaceConfigs); + RedactContentRequest request = RedactContentRequest.newBuilder() + .setInspectConfig(inspectConfig) + .addAllItems(Collections.singletonList(contentItem)) + .addAllReplaceConfigs(replaceConfigs) + .build(); + + RedactContentResponse contentResponse = dlpClient.redactContent(request); for (ContentItem responseItem : contentResponse.getItemsList()) { // print out string with redacted content System.out.println(responseItem.getData().toStringUtf8()); From 537a53d0fa0965351df29efe25cb44a9bae0650e Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Thu, 11 Jan 2018 09:17:23 -0800 Subject: [PATCH 038/406] samples: Updated dataflow, datastore, dlp, errorreporting, firestore, iap, and iot folders. (#986) * Updated dataflow/spanner-io * Updated datastore. * Updated dlp * Updated errorreporting. * Updated firestore/ * Updated iap/ * Updated iot. * Updated datastore/cloud-client. * Re-updated dlp samples. --- .../src/main/java/com/example/dlp/DeIdentification.java | 8 ++++---- .../snippets/src/main/java/com/example/dlp/Inspect.java | 2 +- .../snippets/src/main/java/com/example/dlp/Metadata.java | 2 +- .../src/main/java/com/example/dlp/QuickStart.java | 2 +- .../snippets/src/main/java/com/example/dlp/Redact.java | 2 +- .../src/main/java/com/example/dlp/RiskAnalysis.java | 8 ++++---- .../src/test/java/com/example/dlp/DeIdentificationIT.java | 4 +++- .../snippets/src/test/java/com/example/dlp/InspectIT.java | 4 +++- .../src/test/java/com/example/dlp/MetadataIT.java | 4 +++- .../src/test/java/com/example/dlp/QuickStartIT.java | 4 +++- .../snippets/src/test/java/com/example/dlp/RedactIT.java | 4 +++- .../src/test/java/com/example/dlp/RiskAnalysisIT.java | 4 +++- 12 files changed, 30 insertions(+), 18 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index 296fc582f78..7ee877660c3 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -1,12 +1,12 @@ -/** +/* * Copyright 2017 Google Inc. - *

+ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

+ * * http://www.apache.org/licenses/LICENSE-2.0 - *

+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 28c958d0fcb..30f7b2c6901 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java index c6ffda065f6..7a494d01176 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java index ff5f932ef8c..941a5fb71e8 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java index d775ed61ca4..0e738ca36b5 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java index 89cb840f2d0..8ba83684682 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -1,12 +1,12 @@ -/** +/* * Copyright 2017 Google Inc. - *

+ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

+ * * http://www.apache.org/licenses/LICENSE-2.0 - *

+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java index 0097cee5af1..d31708c568a 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,7 +31,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class DeIdentificationIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 7f598acdb49..5f57d194a8a 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,7 +30,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class InspectIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java index 227ee51caf4..25ba2b68f5d 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,7 +28,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class MetadataIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java index 9b156f1f87a..1fa9d7b36d6 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,7 +28,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class QuickStartIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java index 556e7e16f63..798c11de258 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,7 +31,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class RedactIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java index de5fa22c722..58a1bbb22a2 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java @@ -1,4 +1,4 @@ -/** +/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,7 +29,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +//CHECKSTYLE OFF: AbbreviationAsWordInName public class RiskAnalysisIT { + //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; From 836659d2c268d2cb4f718ea016b18a4b2cc6b28e Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Fri, 2 Mar 2018 16:20:22 -0800 Subject: [PATCH 039/406] samples: Auto Update Dependencies (#1048) --- .../snippets/src/main/java/com/example/dlp/Inspect.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 30f7b2c6901..1d2edf45027 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -19,7 +19,6 @@ import com.google.api.gax.longrunning.OperationFuture; import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.longrunning.Operation; import com.google.privacy.dlp.v2beta1.BigQueryOptions; import com.google.privacy.dlp.v2beta1.BigQueryTable; import com.google.privacy.dlp.v2beta1.CloudStorageOptions; @@ -241,7 +240,7 @@ private static void inspectGcsFile( // ... // block on response, returning job id of the operation InspectOperationResult inspectOperationResult = responseFuture.get(); - ResultName resultName = inspectOperationResult.getNameAsResultName(); + String resultName = inspectOperationResult.getName(); InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); if (inspectResult.getFindingsCount() > 0) { @@ -315,7 +314,7 @@ private static void inspectDatastore( // ... // block on response, returning job id of the operation InspectOperationResult inspectOperationResult = responseFuture.get(); - ResultName resultName = inspectOperationResult.getNameAsResultName(); + String resultName = inspectOperationResult.getName(); InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); if (inspectResult.getFindingsCount() > 0) { @@ -394,7 +393,7 @@ private static void inspectBigquery( // ... // block on response, returning job id of the operation InspectOperationResult inspectOperationResult = responseFuture.get(); - ResultName resultName = inspectOperationResult.getNameAsResultName(); + String resultName = inspectOperationResult.getName(); InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); if (inspectResult.getFindingsCount() > 0) { From a695637bdfe5d1c189ca3c57cd7a9223d870df6c Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Tue, 6 Mar 2018 16:16:50 -0800 Subject: [PATCH 040/406] samples: Clean up DLP region tags. (#1051) --- .../src/main/java/com/example/dlp/DeIdentification.java | 4 ++-- .../snippets/src/main/java/com/example/dlp/Metadata.java | 4 ++-- .../src/main/java/com/example/dlp/RiskAnalysis.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index 7ee877660c3..0e98bbf2041 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -46,7 +46,7 @@ private static void deIdentifyWithMask( String string, Character maskingCharacter, int numberToMask) { - // [START dlp_deidentify_mask] + // [START dlp_deidentify_masking] /** * Deidentify a string by masking sensitive information with a character using the DLP API. * @param string The string to deidentify. @@ -113,7 +113,7 @@ private static void deIdentifyWithMask( } catch (Exception e) { System.out.println("Error in deidentifyWithMask: " + e.getMessage()); } - // [END dlp_deidentify_mask] + // [END dlp_deidentify_masking] } private static void deIdentifyWithFpe( diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java index 7a494d01176..12702284108 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java @@ -49,7 +49,7 @@ private static void listInfoTypes(String category, String languageCode) throws E } private static void listRootCategories(String languageCode) throws Exception { - // [START dlp_list_root_categories] + // [START dlp_list_categories] // Instantiate a DLP client try (DlpServiceClient dlpClient = DlpServiceClient.create()) { // The BCP-47 language code to use, e.g. 'en-US' @@ -61,7 +61,7 @@ private static void listRootCategories(String languageCode) throws Exception { System.out.println("Display name : " + categoryDescription.getDisplayName()); } } - // [END dlp_list_root_categories] + // [END dlp_list_categories] } /** Retrieve infoTypes. */ diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java index 8ba83684682..853b902c555 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -55,7 +55,7 @@ public class RiskAnalysis { private static void calculateNumericalStats( String projectId, String datasetId, String tableId, String columnName) throws Exception { - // [START dlp_numerical_stats_analysis] + // [START dlp_numerical_stats] /** * Calculate numerical statistics for a column in a BigQuery table using the DLP API. @@ -128,13 +128,13 @@ private static void calculateNumericalStats( } catch (Exception e) { System.out.println("Error in numericalStatsAnalysis: " + e.getMessage()); } - // [END dlp_numerical_stats_analysis] + // [END dlp_numerical_stats] } private static void calculateCategoricalStats( String projectId, String datasetId, String tableId, String columnName) throws Exception { - // [START dlp_categorical_stats_analysis] + // [START dlp_categorical_stats] /** * Calculate categorical statistics for a column in a BigQuery table using the DLP API. * @param projectId The Google Cloud Platform project ID to run the API call under. @@ -206,7 +206,7 @@ private static void calculateCategoricalStats( } catch (Exception e) { System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); } - // [END dlp_categorical_stats_analysis] + // [END dlp_categorical_stats] } private static void calculateKAnonymity( From 0c770b4bf720dc523e4dcfbcecf3e061851a6a46 Mon Sep 17 00:00:00 2001 From: Jisha Abubaker Date: Tue, 20 Mar 2018 13:25:24 -0700 Subject: [PATCH 041/406] samples: DLP => v2 (#1056) * DLP => v2 (WIP) Pending tasks: -> Update / Add Tests -> Region tag / comment review -> Submit for code review + fixes -> Merge once google-cloud-java PR : https://github.com/GoogleCloudPlatform/google-cloud-java/pull/2958 is released * Update to most recent versioning. * Updated DeIdentification samples and tests. * Revert pubsub to public version. * Fix Inspect samples/tests (minus pubsub). * Updated Jobs and add tests. * Updated Metadata classes. * Updated QuickStart tests and samples. * Updated Redact samples and tests. * Updated RiskAnalysis. * Update Template samples. * Update trigger tests. * Make Checkstyle Happy Again. * Fix (and ignore) tests using pubsub. * Update PR tests to complete all tests before returning results. (#1065) * Return results of all tests. * Use for loop instead of while. * WIP: Address PR feedback, part 1 * Update deps * Address PR feedback * Remove mvn clean verify failure * Add ReID FPE sample * Address PR feedback * Add k-map sample * checkstyle fixes --- .../com/example/dlp/DeIdentification.java | 532 +++++++++-- .../main/java/com/example/dlp/Inspect.java | 683 ++++++++----- .../src/main/java/com/example/dlp/Jobs.java | 147 +++ .../main/java/com/example/dlp/Metadata.java | 61 +- .../main/java/com/example/dlp/QuickStart.java | 69 +- .../src/main/java/com/example/dlp/Redact.java | 207 ++-- .../java/com/example/dlp/RiskAnalysis.java | 896 +++++++++++++----- .../main/java/com/example/dlp/Templates.java | 263 +++++ .../main/java/com/example/dlp/Triggers.java | 299 ++++++ .../com/example/dlp/DeIdentificationIT.java | 106 ++- .../test/java/com/example/dlp/InspectIT.java | 104 +- .../src/test/java/com/example/dlp/JobsIT.java | 85 ++ .../test/java/com/example/dlp/MetadataIT.java | 27 +- .../java/com/example/dlp/QuickStartIT.java | 11 +- .../test/java/com/example/dlp/RedactIT.java | 53 +- .../java/com/example/dlp/RiskAnalysisIT.java | 136 ++- .../java/com/example/dlp/TemplatesIT.java | 93 ++ .../test/java/com/example/dlp/TriggersIT.java | 106 +++ .../snippets/src/test/resources/dates.csv | 5 + .../src/test/resources/results.correct.csv | 5 + 20 files changed, 2982 insertions(+), 906 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java create mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java create mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java create mode 100644 dlp/snippets/snippets/src/test/resources/dates.csv create mode 100644 dlp/snippets/snippets/src/test/resources/results.correct.csv diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index 0e98bbf2041..8ffa46bc0e9 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -16,21 +16,49 @@ package com.example.dlp; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.common.io.BaseEncoding; -import com.google.privacy.dlp.v2beta1.CharacterMaskConfig; -import com.google.privacy.dlp.v2beta1.ContentItem; -import com.google.privacy.dlp.v2beta1.CryptoKey; -import com.google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig; -import com.google.privacy.dlp.v2beta1.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; -import com.google.privacy.dlp.v2beta1.DeidentifyConfig; -import com.google.privacy.dlp.v2beta1.DeidentifyContentRequest; -import com.google.privacy.dlp.v2beta1.DeidentifyContentResponse; -import com.google.privacy.dlp.v2beta1.InfoTypeTransformations; -import com.google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation; -import com.google.privacy.dlp.v2beta1.KmsWrappedCryptoKey; -import com.google.privacy.dlp.v2beta1.PrimitiveTransformation; +import com.google.privacy.dlp.v2.CharacterMaskConfig; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; +import com.google.privacy.dlp.v2.DateShiftConfig; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Value; import com.google.protobuf.ByteString; +import com.google.type.Date; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.LocalDate; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; @@ -42,31 +70,23 @@ public class DeIdentification { + // [START dlp_deidentify_masking] + /** + * Deidentify a string by masking sensitive information with a character using the DLP API. + * + * @param string The string to deidentify. + * @param maskingCharacter (Optional) The character to mask sensitive data with. + * @param numberToMask (Optional) The number of characters' worth of sensitive data to mask. + * Omitting this value or setting it to 0 masks all sensitive chars. + * @param projectId ID of Google Cloud project to run the API under. + */ private static void deIdentifyWithMask( - String string, - Character maskingCharacter, - int numberToMask) { - // [START dlp_deidentify_masking] - /** - * Deidentify a string by masking sensitive information with a character using the DLP API. - * @param string The string to deidentify. - * @param maskingCharacter (Optional) The character to mask sensitive data with. - * @param numberToMask (Optional) The number of characters' worth of sensitive data to mask. - * Omitting this value or setting it to 0 masks all sensitive chars. - */ + String string, Character maskingCharacter, int numberToMask, String projectId) { // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // string = "My SSN is 372819127"; - // numberToMask = 5; - // maskingCharacter = 'x'; - - ContentItem contentItem = - ContentItem.newBuilder() - .setType("text/plain") - .setValue(string) - .build(); + ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); CharacterMaskConfig characterMaskConfig = CharacterMaskConfig.newBuilder() @@ -76,9 +96,7 @@ private static void deIdentifyWithMask( // Create the deidentification transformation configuration PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder() - .setCharacterMaskConfig(characterMaskConfig) - .build(); + PrimitiveTransformation.newBuilder().setCharacterMaskConfig(characterMaskConfig).build(); InfoTypeTransformation infoTypeTransformationObject = InfoTypeTransformation.newBuilder() @@ -90,16 +108,17 @@ private static void deIdentifyWithMask( .addTransformations(infoTypeTransformationObject) .build(); - // Create the deidentification request object DeidentifyConfig deidentifyConfig = DeidentifyConfig.newBuilder() .setInfoTypeTransformations(infoTypeTransformationArray) .build(); + // Create the deidentification request object DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .setDeidentifyConfig(deidentifyConfig) - .addItems(contentItem) + .setItem(contentItem) .build(); // Execute the deidentification request @@ -107,40 +126,35 @@ private static void deIdentifyWithMask( // Print the character-masked input value // e.g. "My SSN is 123456789" --> "My SSN is *********" - for (ContentItem item : response.getItemsList()) { - System.out.println(item.getValue()); - } + String result = response.getItem().getValue(); + System.out.println(result); } catch (Exception e) { System.out.println("Error in deidentifyWithMask: " + e.getMessage()); } - // [END dlp_deidentify_masking] } + // [END dlp_deidentify_mask] + // [START dlp_deidentify_fpe] + /** + * Deidentify a string by encrypting sensitive information while preserving format. + * + * @param string The string to deidentify. + * @param alphabet The set of characters to use when encrypting the input. For more information, + * see cloud.google.com/dlp/docs/reference/rest/v2/content/deidentify + * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. + * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. + * @param projectId ID of Google Cloud project to run the API under. + */ private static void deIdentifyWithFpe( - String string, FfxCommonNativeAlphabet alphabet, String keyName, String wrappedKey) { - // [START dlp_deidentify_fpe] - /** - * Deidentify a string by encrypting sensitive information while preserving format. - * @param string The string to deidentify. - * @param alphabet The set of characters to use when encrypting the input. For more information, - * see cloud.google.com/dlp/docs/reference/rest/v2beta1/content/deidentify - * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. - * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. - */ - + String string, + FfxCommonNativeAlphabet alphabet, + String keyName, + String wrappedKey, + String projectId, + String surrogateType) { // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // string = "My SSN is 372819127"; - // alphabet = FfxCommonNativeAlphabet.ALPHA_NUMERIC; - // keyName = "projects/GCP_PROJECT/locations/REGION/keyRings/KEYRING_ID/cryptoKeys/KEY_NAME"; - // wrappedKey = "YOUR_ENCRYPTED_AES_256_KEY" - - ContentItem contentItem = - ContentItem.newBuilder() - .setType("text/plain") - .setValue(string) - .build(); + ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); // Create the format-preserving encryption (FPE) configuration KmsWrappedCryptoKey kmsWrappedCryptoKey = @@ -149,15 +163,13 @@ private static void deIdentifyWithFpe( .setCryptoKeyName(keyName) .build(); - CryptoKey cryptoKey = - CryptoKey.newBuilder() - .setKmsWrapped(kmsWrappedCryptoKey) - .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = CryptoReplaceFfxFpeConfig.newBuilder() .setCryptoKey(cryptoKey) .setCommonAlphabet(alphabet) + .setSurrogateInfoType(InfoType.newBuilder().setName(surrogateType).build()) .build(); // Create the deidentification transformation configuration @@ -184,8 +196,9 @@ private static void deIdentifyWithFpe( DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .setDeidentifyConfig(deidentifyConfig) - .addItems(contentItem) + .setItem(contentItem) .build(); // Execute the deidentification request @@ -193,30 +206,310 @@ private static void deIdentifyWithFpe( // Print the deidentified input value // e.g. "My SSN is 123456789" --> "My SSN is 7261298621" - for (ContentItem item : response.getItemsList()) { - System.out.println(item.getValue()); - } + String result = response.getItem().getValue(); + System.out.println(result); } catch (Exception e) { System.out.println("Error in deidentifyWithFpe: " + e.getMessage()); } - // [END dlp_deidentify_fpe] } + // [END dlp_deidentify_fpe] + + // [START dlp_reidentify_fpe] + /** + * Reidentify a string by encrypting sensitive information while preserving format. + * + * @param string The string to reidentify. + * @param alphabet The set of characters used when encrypting the input. For more information, see + * cloud.google.com/dlp/docs/reference/rest/v2/content/deidentify + * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. + * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. + * @param projectId ID of Google Cloud project to run the API under. + * @param surrogateType The name of the surrogate custom info type to used during the encryption + * process. + */ + private static void reIdentifyWithFpe( + String string, + FfxCommonNativeAlphabet alphabet, + String keyName, + String wrappedKey, + String projectId, + String surrogateType) { + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); + + InfoType surrogateTypeObject = InfoType.newBuilder().setName(surrogateType).build(); + + // Create the format-preserving encryption (FPE) configuration + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) + .setCryptoKeyName(keyName) + .build(); + + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + .setCommonAlphabet(alphabet) + .setSurrogateInfoType(surrogateTypeObject) + .build(); + + // Create the deidentification transformation configuration + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + + InfoTypeTransformation infoTypeTransformationObject = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addInfoTypes(surrogateTypeObject) + .build(); + + InfoTypeTransformations infoTypeTransformationArray = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformationObject) + .build(); + + // Create the inspection config + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(surrogateTypeObject) + .setSurrogateType(SurrogateType.newBuilder().build()) + .build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder().addCustomInfoTypes(customInfoType).build(); + + // Create the reidentification request object + DeidentifyConfig reidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(infoTypeTransformationArray) + .build(); + + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setReidentifyConfig(reidentifyConfig) + .setInspectConfig(inspectConfig) + .setItem(contentItem) + .build(); + + // Execute the deidentification request + ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request); + + // Print the reidentified input value + // e.g. "My SSN is 7261298621" --> "My SSN is 123456789" + String result = response.getItem().getValue(); + System.out.println(result); + } catch (Exception e) { + System.out.println("Error in reidentifyWithFpe: " + e.getMessage()); + } + } + // [END dlp_reidentify_fpe] + + // [START dlp_deidentify_date_shift] + /** + * @param inputCsvPath The path to the CSV file to deidentify + * @param outputCsvPath (Optional) path to the output CSV file + * @param dateFields The list of (date) fields in the CSV file to date shift + * @param lowerBoundDays The maximum number of days to shift a date backward + * @param upperBoundDays The maximum number of days to shift a date forward + * @param contextFieldId (Optional) The column to determine date shift, default : a random shift + * amount + * @param wrappedKey (Optional) The encrypted ('wrapped') AES-256 key to use when shifting dates + * @param keyName (Optional) The name of the Cloud KMS key used to encrypt ('wrap') the AES-256 + * key + * @param projectId ID of Google Cloud project to run the API under. + */ + private static void deidentifyWithDateShift( + Path inputCsvPath, + Path outputCsvPath, + String[] dateFields, + int lowerBoundDays, + int upperBoundDays, + String contextFieldId, + String wrappedKey, + String keyName, + String projectId) + throws Exception { + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Set the maximum days to shift a day backward (lowerbound), forward (upperbound) + DateShiftConfig.Builder dateShiftConfigBuilder = + DateShiftConfig.newBuilder() + .setLowerBoundDays(lowerBoundDays) + .setUpperBoundDays(upperBoundDays); + + // If contextFieldId, keyName or wrappedKey is set: all three arguments must be valid + if (contextFieldId != null && keyName != null && wrappedKey != null) { + dateShiftConfigBuilder.setContext(FieldId.newBuilder().setName(contextFieldId).build()); + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setCryptoKeyName(keyName) + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) + .build(); + dateShiftConfigBuilder.setCryptoKey( + CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build()); + + } else if (contextFieldId != null || keyName != null || wrappedKey != null) { + throw new IllegalArgumentException( + "You must set either ALL or NONE of {contextFieldId, keyName, wrappedKey}!"); + } + + // Read and parse the CSV file + BufferedReader br = null; + String line; + List rows = new ArrayList<>(); + List headers; + + br = new BufferedReader(new FileReader(inputCsvPath.toFile())); + + // convert csv header to FieldId + headers = + Arrays.stream(br.readLine().split(",")) + .map(header -> FieldId.newBuilder().setName(header).build()) + .collect(Collectors.toList()); + + while ((line = br.readLine()) != null) { + // convert csv rows to Table.Row + rows.add(convertCsvRowToTableRow(line)); + } + br.close(); + + Table table = Table.newBuilder().addAllHeaders(headers).addAllRows(rows).build(); + + List dateFieldIds = + Arrays.stream(dateFields) + .map(field -> FieldId.newBuilder().setName(field).build()) + .collect(Collectors.toList()); + + DateShiftConfig dateShiftConfig = dateShiftConfigBuilder.build(); + + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .addAllFields(dateFieldIds) + .setPrimitiveTransformation( + PrimitiveTransformation.newBuilder().setDateShiftConfig(dateShiftConfig).build()) + .build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setRecordTransformations( + RecordTransformations.newBuilder() + .addFieldTransformations(fieldTransformation) + .build()) + .build(); + + ContentItem tableItem = ContentItem.newBuilder().setTable(table).build(); + + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setDeidentifyConfig(deidentifyConfig) + .setItem(tableItem) + .build(); + + // Execute the deidentification request + DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); + + // Write out the response as a CSV file + List outputHeaderFields = response.getItem().getTable().getHeadersList(); + List outputRows = response.getItem().getTable().getRowsList(); + + List outputHeaders = + outputHeaderFields.stream().map(FieldId::getName).collect(Collectors.toList()); + + File outputFile = outputCsvPath.toFile(); + if (!outputFile.exists()) { + outputFile.createNewFile(); + } + BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); + + // write out headers + bufferedWriter.append(String.join(",", outputHeaders) + "\n"); + + // write out each row + for (Table.Row outputRow : outputRows) { + String row = + outputRow + .getValuesList() + .stream() + .map(value -> value.getStringValue()) + .collect(Collectors.joining(",")); + bufferedWriter.append(row + "\n"); + } + + bufferedWriter.flush(); + bufferedWriter.close(); + + System.out.println("Successfully saved date-shift output to: " + outputCsvPath.getFileName()); + } catch (Exception e) { + System.out.println("Error in deidentifyWithDateShift: " + e.getMessage()); + } + } + + // Parse string to valid date, return null when invalid + private static LocalDate getValidDate(String dateString) { + try { + return LocalDate.parse(dateString); + } catch (DateTimeParseException e) { + return null; + } + } + + // convert CSV row into Table.Row + private static Table.Row convertCsvRowToTableRow(String row) { + String[] values = row.split(","); + Table.Row.Builder tableRowBuilder = Table.Row.newBuilder(); + for (String value : values) { + LocalDate date = getValidDate(value); + if (date != null) { + // convert to com.google.type.Date + Date dateValue = + Date.newBuilder() + .setYear(date.getYear()) + .setMonth(date.getMonthValue()) + .setDay(date.getDayOfMonth()) + .build(); + Value tableValue = Value.newBuilder().setDateValue(dateValue).build(); + tableRowBuilder.addValues(tableValue); + } else { + tableRowBuilder.addValues(Value.newBuilder().setStringValue(value).build()); + } + } + return tableRowBuilder.build(); + } + // [END dlp_deidentify_date_shift] /** - * Command line application to de-identify data using the Data Loss Prevention API. - * Supported data format: strings + * Command line application to de-identify data using the Data Loss Prevention API. Supported data + * format: strings */ public static void main(String[] args) throws Exception { OptionGroup optionsGroup = new OptionGroup(); optionsGroup.setRequired(true); - Option deidentifyMaskingOption = new Option("m", "mask", true, "deid with character masking"); + Option deidentifyMaskingOption = + new Option("m", "mask", true, "Deidentify with character masking."); optionsGroup.addOption(deidentifyMaskingOption); - Option deidentifyFpeOption = new Option("f", "fpe", true, "deid with FFX FPE"); + Option deidentifyFpeOption = + new Option("f", "fpe", true, "Deidentify with format-preserving encryption."); optionsGroup.addOption(deidentifyFpeOption); + Option reidentifyFpeOption = + new Option("r", "reid", true, "Reidentify with format-preserving encryption."); + optionsGroup.addOption(reidentifyFpeOption); + + Option deidentifyDateShiftOption = + new Option("d", "date", false, "Deidentify dates in a CSV file."); + optionsGroup.addOption(deidentifyDateShiftOption); + Options commandLineOptions = new Options(); commandLineOptions.addOptionGroup(optionsGroup); @@ -224,22 +517,47 @@ public static void main(String[] args) throws Exception { Option.builder("maskingCharacter").hasArg(true).required(false).build(); commandLineOptions.addOption(maskingCharacterOption); - Option numberToMaskOption = - Option.builder("numberToMask").hasArg(true).required(false).build(); + Option surrogateTypeOption = + Option.builder("surrogateType").hasArg(true).required(false).build(); + commandLineOptions.addOption(surrogateTypeOption); + + Option numberToMaskOption = Option.builder("numberToMask").hasArg(true).required(false).build(); commandLineOptions.addOption(numberToMaskOption); - Option alphabetOption = - Option.builder("commonAlphabet").hasArg(true).required(false).build(); + Option alphabetOption = Option.builder("commonAlphabet").hasArg(true).required(false).build(); commandLineOptions.addOption(alphabetOption); - Option wrappedKeyOption = - Option.builder("wrappedKey").hasArg(true).required(false).build(); + Option wrappedKeyOption = Option.builder("wrappedKey").hasArg(true).required(false).build(); commandLineOptions.addOption(wrappedKeyOption); - Option keyNameOption = - Option.builder("keyName").hasArg(true).required(false).build(); + Option keyNameOption = Option.builder("keyName").hasArg(true).required(false).build(); commandLineOptions.addOption(keyNameOption); + Option inputCsvPathOption = Option.builder("inputCsvPath").hasArg(true).required(false).build(); + commandLineOptions.addOption(inputCsvPathOption); + + Option outputCsvPathOption = + Option.builder("outputCsvPath").hasArg(true).required(false).build(); + commandLineOptions.addOption(outputCsvPathOption); + + Option dateFieldsOption = Option.builder("dateFields").hasArg(true).required(false).build(); + commandLineOptions.addOption(dateFieldsOption); + + Option lowerBoundDaysOption = + Option.builder("lowerBoundDays").hasArg(true).required(false).build(); + commandLineOptions.addOption(lowerBoundDaysOption); + + Option upperBoundDaysOption = + Option.builder("upperBoundDays").hasArg(true).required(false).build(); + commandLineOptions.addOption(upperBoundDaysOption); + + Option contextFieldNameOption = + Option.builder("contextField").hasArg(true).required(false).build(); + commandLineOptions.addOption(contextFieldNameOption); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); + commandLineOptions.addOption(projectIdOption); + CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; @@ -253,22 +571,62 @@ public static void main(String[] args) throws Exception { return; } + // default to auto-detected project id when not explicitly provided + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + if (cmd.hasOption("m")) { // deidentification with character masking int numberToMask = Integer.parseInt(cmd.getOptionValue(numberToMaskOption.getOpt(), "0")); char maskingCharacter = cmd.getOptionValue(maskingCharacterOption.getOpt(), "*").charAt(0); String val = cmd.getOptionValue(deidentifyMaskingOption.getOpt()); - deIdentifyWithMask(val, maskingCharacter, numberToMask); + deIdentifyWithMask(val, maskingCharacter, numberToMask, projectId); } else if (cmd.hasOption("f")) { // deidentification with FPE String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); String keyName = cmd.getOptionValue(keyNameOption.getOpt()); String val = cmd.getOptionValue(deidentifyFpeOption.getOpt()); + String surrogateType = cmd.getOptionValue(surrogateTypeOption.getOpt()); + FfxCommonNativeAlphabet alphabet = + FfxCommonNativeAlphabet.valueOf( + cmd.getOptionValue( + alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); + deIdentifyWithFpe(val, alphabet, keyName, wrappedKey, projectId, surrogateType); + } else if (cmd.hasOption("d")) { + //deidentify with date shift + String inputCsv = cmd.getOptionValue(inputCsvPathOption.getOpt()); + String outputCsv = cmd.getOptionValue(outputCsvPathOption.getOpt()); + + String contextField = cmd.getOptionValue(contextFieldNameOption.getOpt(), null); + String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt(), null); + String keyName = cmd.getOptionValue(keyNameOption.getOpt(), null); + + String[] dateFields = cmd.getOptionValue(dateFieldsOption.getOpt(), "").split(","); + + int lowerBoundsDay = Integer.valueOf(cmd.getOptionValue(lowerBoundDaysOption.getOpt())); + int upperBoundsDay = Integer.valueOf(cmd.getOptionValue(upperBoundDaysOption.getOpt())); + + deidentifyWithDateShift( + Paths.get(inputCsv), + Paths.get(outputCsv), + dateFields, + lowerBoundsDay, + upperBoundsDay, + contextField, + wrappedKey, + keyName, + projectId); + } else if (cmd.hasOption("r")) { + // reidentification with FPE + String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); + String keyName = cmd.getOptionValue(keyNameOption.getOpt()); + String val = cmd.getOptionValue(reidentifyFpeOption.getOpt()); + String surrogateType = cmd.getOptionValue(surrogateTypeOption.getOpt()); FfxCommonNativeAlphabet alphabet = FfxCommonNativeAlphabet.valueOf( cmd.getOptionValue( alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); - deIdentifyWithFpe(val, alphabet, keyName, wrappedKey); + reIdentifyWithFpe(val, alphabet, keyName, wrappedKey, projectId, surrogateType); } } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 1d2edf45027..d4adc6d33ba 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -16,37 +16,45 @@ package com.example.dlp; -import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.core.SettableApiFuture; import com.google.cloud.ServiceOptions; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.privacy.dlp.v2beta1.BigQueryOptions; -import com.google.privacy.dlp.v2beta1.BigQueryTable; -import com.google.privacy.dlp.v2beta1.CloudStorageOptions; -import com.google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet; -import com.google.privacy.dlp.v2beta1.ContentItem; -import com.google.privacy.dlp.v2beta1.DatastoreOptions; -import com.google.privacy.dlp.v2beta1.Finding; -import com.google.privacy.dlp.v2beta1.InfoType; -import com.google.privacy.dlp.v2beta1.InspectConfig; -import com.google.privacy.dlp.v2beta1.InspectContentRequest; -import com.google.privacy.dlp.v2beta1.InspectContentResponse; -import com.google.privacy.dlp.v2beta1.InspectOperationMetadata; -import com.google.privacy.dlp.v2beta1.InspectOperationResult; -import com.google.privacy.dlp.v2beta1.InspectResult; -import com.google.privacy.dlp.v2beta1.KindExpression; -import com.google.privacy.dlp.v2beta1.Likelihood; -import com.google.privacy.dlp.v2beta1.OutputStorageConfig; -import com.google.privacy.dlp.v2beta1.PartitionId; -import com.google.privacy.dlp.v2beta1.ResultName; -import com.google.privacy.dlp.v2beta1.StorageConfig; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.BigQueryOptions; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DatastoreOptions; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectConfig.FindingLimits; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.InspectResult; +import com.google.privacy.dlp.v2.KindExpression; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.PartitionId; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; import com.google.protobuf.ByteString; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; import java.net.URLConnection; import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.concurrent.TimeUnit; import javax.activation.MimetypesFileTypeMap; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -59,232 +67,308 @@ public class Inspect { + /** + * [START dlp_inspect_string] Inspect a text for given InfoTypes + * + * @param string String to instpect + * @param minLikelihood The minimum likelihood required before returning a match + * @param maxFindings The maximum number of findings to report (0 = server maximum) + * @param infoTypes The infoTypes of information to match + * @param includeQuote Whether to include the matching string + * @param projectId Google Cloud project ID + */ private static void inspectString( String string, Likelihood minLikelihood, int maxFindings, List infoTypes, - boolean includeQuote) { - // [START dlp_inspect_string] + boolean includeQuote, + String projectId) { // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // The minimum likelihood required before returning a match - // minLikelihood = LIKELIHOOD_UNSPECIFIED; - - // The maximum number of findings to report (0 = server maximum) - // maxFindings = 0; - - // The infoTypes of information to match - // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - - // Whether to include the matching string - // includeQuote = true; + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) - .setMaxFindings(maxFindings) + .setLimits(findingLimits) .setIncludeQuote(includeQuote) .build(); - // The string to inspect - // string = 'My name is Gary and my email is gary@example.com'; - ContentItem contentItem = - ContentItem.newBuilder().setType("text/plain").setValue(string).build(); + ByteContentItem byteContentItem = + ByteContentItem.newBuilder() + .setType(ByteContentItem.BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(string)) + .build(); + + ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .setInspectConfig(inspectConfig) - .addItems(contentItem) + .setItem(contentItem) .build(); InspectContentResponse response = dlpServiceClient.inspectContent(request); - for (InspectResult result : response.getResultsList()) { - if (result.getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : result.getFindingsList()) { - if (includeQuote) { - System.out.print("Quote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + if (response.getResult().getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : response.getResult().getFindingsList()) { + if (includeQuote) { + System.out.print("\tQuote: " + finding.getQuote()); } - } else { - System.out.println("No findings."); + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); } + } else { + System.out.println("No findings."); } } catch (Exception e) { System.out.println("Error in inspectString: " + e.getMessage()); } - // [END dlp_inspect_string] } + // [END dlp_inspect_string] + // [START dlp_inspect_file] + /** + * Inspect a local file + * + * @param filePath The path to a local file to inspect. Can be a text, JPG, or PNG file. + * @param minLikelihood The minimum likelihood required before returning a match + * @param maxFindings The maximum number of findings to report (0 = server maximum) + * @param infoTypes The infoTypes of information to match + * @param includeQuote Whether to include the matching string + * @param projectId Google Cloud project ID + */ private static void inspectFile( String filePath, Likelihood minLikelihood, int maxFindings, List infoTypes, - boolean includeQuote) { - // [START dlp_inspect_file] + boolean includeQuote, + String projectId) { // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // The path to a local file to inspect. Can be a text, JPG, or PNG file. - // fileName = 'path/to/image.png'; - - // The minimum likelihood required before returning a match - // minLikelihood = LIKELIHOOD_UNSPECIFIED; - - // The maximum number of findings to report (0 = server maximum) - // maxFindings = 0; - - // The infoTypes of information to match - // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - - // Whether to include the matching string - // includeQuote = true; - Path path = Paths.get(filePath); - // detect file mime type, default to application/octet-stream String mimeType = URLConnection.guessContentTypeFromName(filePath); if (mimeType == null) { mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); } - if (mimeType == null) { - mimeType = "application/octet-stream"; + + ByteContentItem.BytesType bytesType; + switch (mimeType) { + case "image/jpeg": + bytesType = ByteContentItem.BytesType.IMAGE_JPEG; + break; + case "image/bmp": + bytesType = ByteContentItem.BytesType.IMAGE_BMP; + break; + case "image/png": + bytesType = ByteContentItem.BytesType.IMAGE_PNG; + break; + case "image/svg": + bytesType = ByteContentItem.BytesType.IMAGE_SVG; + break; + default: + bytesType = ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED; + break; } - byte[] data = Files.readAllBytes(path); - ContentItem contentItem = - ContentItem.newBuilder().setType(mimeType).setData(ByteString.copyFrom(data)).build(); + byte[] data = Files.readAllBytes(Paths.get(filePath)); + ByteContentItem byteContentItem = + ByteContentItem.newBuilder() + .setType(bytesType) + .setData(ByteString.copyFrom(data)) + .build(); + ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); + + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) - .setMaxFindings(maxFindings) + .setLimits(findingLimits) .setIncludeQuote(includeQuote) .build(); InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .setInspectConfig(inspectConfig) - .addItems(contentItem) + .setItem(contentItem) .build(); + InspectContentResponse response = dlpServiceClient.inspectContent(request); - for (InspectResult result : response.getResultsList()) { - if (result.getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : result.getFindingsList()) { - if (includeQuote) { - System.out.print("Quote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + InspectResult result = response.getResult(); + if (result.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + if (includeQuote) { + System.out.print("\tQuote: " + finding.getQuote()); } - } else { - System.out.println("No findings."); + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); } + } else { + System.out.println("No findings."); } } catch (Exception e) { - e.printStackTrace(); System.out.println("Error in inspectFile: " + e.getMessage()); } - // [END dlp_inspect_file] } + // [END dlp_inspect_file] + // [START dlp_inspect_gcs] + /** + * Inspect GCS file for Info types and wait on job completion using Google Cloud Pub/Sub + * notification + * + * @param bucketName The name of the bucket where the file resides. + * @param fileName The path to the file within the bucket to inspect (can include wildcards, eg. + * my-image.*) + * @param minLikelihood The minimum likelihood required before returning a match + * @param infoTypes The infoTypes of information to match + * @param maxFindings The maximum number of findings to report (0 = server maximum) + * @param topicId Google Cloud Pub/Sub topic Id to notify of job status + * @param subscriptionId Google Cloud Subscription to above topic to listen for job status updates + * @param projectId Google Cloud project ID + */ private static void inspectGcsFile( - String bucketName, String fileName, Likelihood minLikelihood, List infoTypes) + String bucketName, + String fileName, + Likelihood minLikelihood, + List infoTypes, + int maxFindings, + String topicId, + String subscriptionId, + String projectId) throws Exception { - // [START dlp_inspect_gcs] // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // The name of the bucket where the file resides. - // bucketName = 'YOUR-BUCKET'; - - // The path to the file within the bucket to inspect. - // Can contain wildcards, e.g. "my-image.*" - // fileName = 'my-image.png'; - - // The minimum likelihood required before returning a match - // minLikelihood = LIKELIHOOD_UNSPECIFIED; - - // The maximum number of findings to report (0 = server maximum) - // maxFindings = 0; - - // The infoTypes of information to match - // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; CloudStorageOptions cloudStorageOptions = CloudStorageOptions.newBuilder() - .setFileSet(FileSet.newBuilder().setUrl("gs://" + bucketName + "/" + fileName)) + .setFileSet( + CloudStorageOptions.FileSet.newBuilder() + .setUrl("gs://" + bucketName + "/" + fileName)) .build(); StorageConfig storageConfig = StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); + InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) .build(); - // optionally provide an output configuration to store results, default : none - OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); - // asynchronously submit an inspect operation - OperationFuture responseFuture = - dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - // ... - // block on response, returning job id of the operation - InspectOperationResult inspectOperationResult = responseFuture.get(); - String resultName = inspectOperationResult.getName(); - InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Semi-synchronously submit an inspect job, and wait on results + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + System.out.println("Job created with ID:" + dlpJob.getName()); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.of(projectId, subscriptionId), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage + .getAttributesMap() + .get("DlpJobName") + .equals(dlpJob.getName())) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (Exception e) { + System.out.println("Unable to verify job completion."); + } + + DlpJob completedJob = + dlpServiceClient.getDlpJob( + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); - if (inspectResult.getFindingsCount() > 0) { + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); + InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); + if (result.getInfoTypeStatsCount() > 0) { System.out.println("Findings: "); - for (Finding finding : inspectResult.getFindingsList()) { - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); } } else { System.out.println("No findings."); } - } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error in inspectGCSFileAsync: " + e.getMessage()); } - // [END dlp_inspect_gcs] } + // [END dlp_inspect_gcs] + // [START dlp_inspect_datastore] + /** + * Inspect a Datastore kind + * + * @param projectId The project ID containing the target Datastore + * @param namespaceId The ID namespace of the Datastore document to inspect + * @param kind The kind of the Datastore entity to inspect + * @param minLikelihood The minimum likelihood required before returning a match + * @param infoTypes The infoTypes of information to match + * @param maxFindings max number of findings + * @param topicId Google Cloud Pub/Sub topic to notify job status updates + * @param subscriptionId Google Cloud Pub/Sub subscription to above topic to receive status + * updates + */ private static void inspectDatastore( String projectId, String namespaceId, String kind, Likelihood minLikelihood, - List infoTypes) { - // [START dlp_inspect_datastore] + List infoTypes, + int maxFindings, + String topicId, + String subscriptionId) { // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // (Optional) The project ID containing the target Datastore - // projectId = my-project-id - - // (Optional) The ID namespace of the Datastore document to inspect. - // To ignore Datastore namespaces, set this to an empty string ('') - // namespaceId = ''; - - // The kind of the Datastore entity to inspect. - // kind = 'Person'; - - // The minimum likelihood required before returning a match - // minLikelihood = LIKELIHOOD_UNSPECIFIED; - - // The infoTypes of information to match - // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - // Reference to the Datastore namespace PartitionId partitionId = PartitionId.newBuilder().setProjectId(projectId).setNamespaceId(namespaceId).build(); @@ -298,123 +382,217 @@ private static void inspectDatastore( StorageConfig storageConfig = StorageConfig.newBuilder().setDatastoreOptions(datastoreOptions).build(); + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); + InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) .build(); - // optionally provide an output configuration to store results, default : none - OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); - // asynchronously submit an inspect operation - OperationFuture responseFuture = - dlpServiceClient.createInspectOperationAsync(inspectConfig, storageConfig, outputConfig); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - // ... - // block on response, returning job id of the operation - InspectOperationResult inspectOperationResult = responseFuture.get(); - String resultName = inspectOperationResult.getName(); - InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Asynchronously submit an inspect job, and wait on results + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + System.out.println("Job created with ID:" + dlpJob.getName()); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.of(projectId, subscriptionId), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage + .getAttributesMap() + .get("DlpJobName") + .equals(dlpJob.getName())) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (Exception e) { + System.out.println("Unable to verify job completion."); + } - if (inspectResult.getFindingsCount() > 0) { + DlpJob completedJob = + dlpServiceClient.getDlpJob( + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); + + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); + InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); + if (result.getInfoTypeStatsCount() > 0) { System.out.println("Findings: "); - for (Finding finding : inspectResult.getFindingsList()) { - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); } } else { System.out.println("No findings."); } } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error in inspectDatastore: " + e.getMessage()); + System.out.println("inspectDatastore Problems: " + e.getMessage()); } - // [END dlp_inspect_datastore] } + // [END dlp_inspect_datastore] + // [START dlp_inspect_bigquery] + /** + * Inspect a BigQuery table + * + * @param projectId The project ID to run the API call under + * @param datasetId The ID of the dataset to inspect, e.g. 'my_dataset' + * @param tableId The ID of the table to inspect, e.g. 'my_table' + * @param minLikelihood The minimum likelihood required before returning a match + * @param infoTypes The infoTypes of information to match + * @param maxFindings The maximum number of findings to report (0 = server maximum) + * @param topicId Topic ID for pubsub. + * @param subscriptionId Subscription ID for pubsub. + */ private static void inspectBigquery( - String projectId, - String datasetId, - String tableId, - Likelihood minLikelihood, - List infoTypes) { - // [START dlp_inspect_bigquery] + String projectId, + String datasetId, + String tableId, + Likelihood minLikelihood, + List infoTypes, + int maxFindings, + String topicId, + String subscriptionId) { // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // (Optional) The project ID to run the API call under - // projectId = my-project-id - - // The ID of the dataset to inspect, e.g. 'my_dataset' - // datasetId = "my_dataset"; - - // The ID of the table to inspect, e.g. 'my_table' - // tableId = "my_table"; - - // The minimum likelihood required before returning a match - // minLikelihood = LIKELIHOOD_UNSPECIFIED; - - // The infoTypes of information to match - // infoTypes = ['US_MALE_NAME', 'US_FEMALE_NAME']; - // Reference to the BigQuery table BigQueryTable tableReference = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); BigQueryOptions bigQueryOptions = - BigQueryOptions.newBuilder() - .setTableReference(tableReference) - .build(); + BigQueryOptions.newBuilder().setTableReference(tableReference).build(); // Construct BigQuery configuration to be inspected StorageConfig storageConfig = - StorageConfig.newBuilder() - .setBigQueryOptions(bigQueryOptions) - .build(); + StorageConfig.newBuilder().setBigQueryOptions(bigQueryOptions).build(); + + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); - - // optionally provide an output configuration to store results, default : none - OutputStorageConfig outputConfig = OutputStorageConfig.getDefaultInstance(); - - // asynchronously submit an inspect operation - OperationFuture responseFuture = - dlpServiceClient.createInspectOperationAsync( - inspectConfig, storageConfig, outputConfig); - - // ... - // block on response, returning job id of the operation - InspectOperationResult inspectOperationResult = responseFuture.get(); - String resultName = inspectOperationResult.getName(); - InspectResult inspectResult = dlpServiceClient.listInspectFindings(resultName).getResult(); - - if (inspectResult.getFindingsCount() > 0) { + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) + .build(); + + ProjectTopicName topic = ProjectTopicName.of(projectId, topicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(topic.toString()).build(); + + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Asynchronously submit an inspect job, and wait on results + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + System.out.println("Job created with ID:" + dlpJob.getName()); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.of(projectId, subscriptionId), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage + .getAttributesMap() + .get("DlpJobName") + .equals(dlpJob.getName())) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (Exception e) { + System.out.println("Unable to verify job completion."); + } + + DlpJob completedJob = + dlpServiceClient.getDlpJob( + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); + + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); + InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); + if (result.getInfoTypeStatsCount() > 0) { System.out.println("Findings: "); - for (Finding finding : inspectResult.getFindingsList()) { - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); } } else { System.out.println("No findings."); } } catch (Exception e) { - e.printStackTrace(); - System.out.println("Error in inspectBigguery: " + e.getMessage()); + System.out.println("inspectBigquery Problems: " + e.getMessage()); } - // [END dlp_inspect_bigquery] } + // [END dlp_inspect_bigquery] /** - * Command line application to inspect data using the Data Loss Prevention API. - * Supported data formats: string, file, text file on GCS, BigQuery table, and Datastore entity + * Command line application to inspect data using the Data Loss Prevention API. Supported data + * formats: string, file, text file on GCS, BigQuery table, and Datastore entity */ public static void main(String[] args) throws Exception { @@ -466,10 +644,16 @@ public static void main(String[] args) throws Exception { Option tableIdOption = Option.builder("tableId").hasArg(true).required(false).build(); commandLineOptions.addOption(tableIdOption); - Option projectIdOption = - Option.builder("projectId").hasArg(true).required(false).build(); + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); commandLineOptions.addOption(projectIdOption); + Option topicIdOption = Option.builder("topicId").hasArg(true).required(false).build(); + commandLineOptions.addOption(topicIdOption); + + Option subscriptionIdOption = + Option.builder("subscriptionId").hasArg(true).required(false).build(); + commandLineOptions.addOption(subscriptionIdOption); + Option datastoreNamespaceOption = Option.builder("namespace").hasArg(true).required(false).build(); commandLineOptions.addOption(datastoreNamespaceOption); @@ -498,6 +682,11 @@ public static void main(String[] args) throws Exception { boolean includeQuote = Boolean.parseBoolean(cmd.getOptionValue(includeQuoteOption.getOpt(), "true")); + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + String topicId = cmd.getOptionValue(topicIdOption.getOpt()); + String subscriptionId = cmd.getOptionValue(subscriptionIdOption.getOpt()); + List infoTypesList = Collections.emptyList(); if (cmd.hasOption(infoTypesOption.getOpt())) { infoTypesList = new ArrayList<>(); @@ -509,32 +698,50 @@ public static void main(String[] args) throws Exception { // string inspection if (cmd.hasOption("s")) { String val = cmd.getOptionValue(stringOption.getOpt()); - inspectString(val, minLikelihood, maxFindings, infoTypesList, includeQuote); + inspectString(val, minLikelihood, maxFindings, infoTypesList, includeQuote, projectId); } else if (cmd.hasOption("f")) { String filePath = cmd.getOptionValue(fileOption.getOpt()); - inspectFile(filePath, minLikelihood, maxFindings, infoTypesList, includeQuote); + inspectFile(filePath, minLikelihood, maxFindings, infoTypesList, includeQuote, projectId); // gcs file inspection } else if (cmd.hasOption("gcs")) { String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); - inspectGcsFile(bucketName, fileName, minLikelihood, infoTypesList); + inspectGcsFile( + bucketName, + fileName, + minLikelihood, + infoTypesList, + maxFindings, + topicId, + subscriptionId, + projectId); // datastore kind inspection } else if (cmd.hasOption("ds")) { String namespaceId = cmd.getOptionValue(datastoreNamespaceOption.getOpt(), ""); String kind = cmd.getOptionValue(datastoreKindOption.getOpt()); // use default project id when project id is not specified - String projectId = - cmd.getOptionValue( - projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); - inspectDatastore(projectId, namespaceId, kind, minLikelihood, infoTypesList); + inspectDatastore( + projectId, + namespaceId, + kind, + minLikelihood, + infoTypesList, + maxFindings, + topicId, + subscriptionId); } else if (cmd.hasOption("bq")) { String datasetId = cmd.getOptionValue(datasetIdOption.getOpt()); String tableId = cmd.getOptionValue(tableIdOption.getOpt()); // use default project id when project id is not specified - String projectId = - cmd.getOptionValue( - projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); - inspectBigquery(projectId, datasetId, tableId, minLikelihood, infoTypesList); + inspectBigquery( + projectId, + datasetId, + tableId, + minLikelihood, + infoTypesList, + maxFindings, + topicId, + subscriptionId); } } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java new file mode 100644 index 00000000000..43ed11dd4ab --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java @@ -0,0 +1,147 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.DlpJobType; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ProjectName; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class Jobs { + + // [START dlp_list_jobs] + /* + * List DLP jobs + * + * @param projectId The project ID to run the API call under + * @param filter The filter expression to use, eg. state=DONE For more information on filter + * syntax see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list + * @param jobType The type of job to list (either 'INSPECT_JOB' or 'RISK_ANALYSIS_JOB') + */ + private static void listJobs(String projectId, String filter, DlpJobType jobType) + throws Exception { + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + ListDlpJobsRequest listDlpJobsRequest = + ListDlpJobsRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setFilter(filter) + .setType(jobType) + .build(); + DlpServiceClient.ListDlpJobsPagedResponse response = + dlpServiceClient.listDlpJobs(listDlpJobsRequest); + for (DlpJob dlpJob : response.getPage().getValues()) { + System.out.println(dlpJob.getName() + " -- " + dlpJob.getState()); + } + } + } + // [END dlp_list_jobs] + + /** + * Delete a DLP Job + * + * @param projectId Google Cloud ProjectID + * @param jobId DLP Job ID + */ + // [START dlp_delete_job] + private static void deleteJob(String projectId, String jobId) { + + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // construct complete job name + DlpJobName job = DlpJobName.of(projectId, jobId); + + DeleteDlpJobRequest deleteDlpJobRequest = + DeleteDlpJobRequest.newBuilder().setName(job.toString()).build(); + + // submit job deletion request + dlpServiceClient.deleteDlpJob(deleteDlpJobRequest); + + System.out.println("Job deleted successfully."); + } catch (Exception e) { + System.err.println("Error deleting DLP job: " + e.getMessage()); + } + } + // [END dlp_delete_job] + + /** Command line application to list and delete DLP jobs the Data Loss Prevention API. */ + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + Option listOption = new Option("l", "list", false, "List DLP Jobs"); + optionsGroup.addOption(listOption); + + Option deleteOption = new Option("d", "delete", false, "Delete DLP Jobs"); + optionsGroup.addOption(deleteOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); + commandLineOptions.addOption(projectIdOption); + + Option filterOption = Option.builder("filter").hasArg(true).required(false).build(); + commandLineOptions.addOption(filterOption); + + Option jobTypeOption = Option.builder("jobType").hasArg(true).required(false).build(); + commandLineOptions.addOption(jobTypeOption); + + Option jobIdOption = Option.builder("jobId").hasArg(true).required(false).build(); + commandLineOptions.addOption(jobIdOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(Inspect.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + + if (cmd.hasOption(listOption.getOpt())) { + String filter = cmd.getOptionValue(filterOption.getOpt(), ""); + DlpJobType jobType = + DlpJobType.valueOf( + cmd.getOptionValue( + jobTypeOption.getOpt(), DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.name())); + listJobs(projectId, filter, jobType); + } + + if (cmd.hasOption(deleteOption.getOpt())) { + String jobId = cmd.getOptionValue(jobIdOption.getOpt()); + deleteJob(projectId, jobId); + } + } +} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java index 12702284108..3b7a85aec5b 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java @@ -16,11 +16,10 @@ package com.example.dlp; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.privacy.dlp.v2beta1.CategoryDescription; -import com.google.privacy.dlp.v2beta1.InfoTypeDescription; -import com.google.privacy.dlp.v2beta1.ListInfoTypesResponse; -import com.google.privacy.dlp.v2beta1.ListRootCategoriesResponse; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.InfoTypeDescription; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; import java.util.List; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -32,48 +31,37 @@ public class Metadata { - private static void listInfoTypes(String category, String languageCode) throws Exception { - // [START dlp_list_info_types] + // [START dlp_list_info_types] + /* + * List the types of sensitive information the DLP API supports. + * + * @param filter The filter to use, e.g. "supported_by=INSPECT" + * @param languageCode The BCP-47 language code to use, e.g. 'en-US' + */ + private static void listInfoTypes(String filter, String languageCode) throws Exception { + // Instantiate a DLP client try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - // The category of info types to list, e.g. category = 'GOVERNMENT'; - // Optional BCP-47 language code for localized info type friendly names, e.g. 'en-US' - ListInfoTypesResponse infoTypesResponse = dlpClient.listInfoTypes(category, languageCode); + ListInfoTypesRequest listInfoTypesRequest = + ListInfoTypesRequest.newBuilder().setFilter(filter).setLanguageCode(languageCode).build(); + ListInfoTypesResponse infoTypesResponse = dlpClient.listInfoTypes(listInfoTypesRequest); List infoTypeDescriptions = infoTypesResponse.getInfoTypesList(); for (InfoTypeDescription infoTypeDescription : infoTypeDescriptions) { System.out.println("Name : " + infoTypeDescription.getName()); System.out.println("Display name : " + infoTypeDescription.getDisplayName()); } } - // [END dlp_list_info_types] - } - - private static void listRootCategories(String languageCode) throws Exception { - // [START dlp_list_categories] - // Instantiate a DLP client - try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - // The BCP-47 language code to use, e.g. 'en-US' - // languageCode = 'en-US' - ListRootCategoriesResponse rootCategoriesResponse = - dlpClient.listRootCategories(languageCode); - for (CategoryDescription categoryDescription : rootCategoriesResponse.getCategoriesList()) { - System.out.println("Name : " + categoryDescription.getName()); - System.out.println("Display name : " + categoryDescription.getDisplayName()); - } - } - // [END dlp_list_categories] } + // [END dlp_list_info_types] /** Retrieve infoTypes. */ public static void main(String[] args) throws Exception { Options options = new Options(); - Option languageCodeOption = new Option("language", null, true, "BCP-47 language code"); - languageCodeOption.setRequired(false); + Option languageCodeOption = Option.builder("language").hasArg(true).required(false).build(); options.addOption(languageCodeOption); - Option categoryOption = new Option("category", null, true, "Category of info types to list."); - categoryOption.setRequired(false); - options.addOption(categoryOption); + Option filterOption = Option.builder("filter").hasArg(true).required(false).build(); + options.addOption(filterOption); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); @@ -87,11 +75,8 @@ public static void main(String[] args) throws Exception { return; } String languageCode = cmd.getOptionValue(languageCodeOption.getOpt(), "en-US"); - if (cmd.hasOption(categoryOption.getOpt())) { - String category = cmd.getOptionValue(categoryOption.getOpt()); - listInfoTypes(category, languageCode); - } else { - listRootCategories(languageCode); - } + String filter = cmd.getOptionValue(filterOption.getOpt(), ""); + + listInfoTypes(filter, languageCode); } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java index 941a5fb71e8..52946585907 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java @@ -16,15 +16,19 @@ package com.example.dlp; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.privacy.dlp.v2beta1.ContentItem; -import com.google.privacy.dlp.v2beta1.Finding; -import com.google.privacy.dlp.v2beta1.InfoType; -import com.google.privacy.dlp.v2beta1.InspectConfig; -import com.google.privacy.dlp.v2beta1.InspectContentRequest; -import com.google.privacy.dlp.v2beta1.InspectContentResponse; -import com.google.privacy.dlp.v2beta1.InspectResult; -import com.google.privacy.dlp.v2beta1.Likelihood; +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectResult; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; import java.util.Arrays; import java.util.List; @@ -35,11 +39,11 @@ public class QuickStart { public static void main(String[] args) throws Exception { // string to inspect - String text = "Robert Frost"; + String text = "His name was Robert Frost"; // The minimum likelihood required before returning a match: // LIKELIHOOD_UNSPECIFIED, VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, VERY_LIKELY, UNRECOGNIZED - Likelihood minLikelihood = Likelihood.VERY_LIKELY; + Likelihood minLikelihood = Likelihood.POSSIBLE; // The maximum number of findings to report (0 = server maximum) int maxFindings = 0; @@ -47,8 +51,8 @@ public static void main(String[] args) throws Exception { // The infoTypes of information to match List infoTypes = Arrays.asList( - InfoType.newBuilder().setName("US_MALE_NAME").build(), - InfoType.newBuilder().setName("US_FEMALE_NAME").build()); + InfoType.newBuilder().setName("PERSON_NAME").build(), + InfoType.newBuilder().setName("US_STATE").build()); // Whether to include the matching string boolean includeQuote = true; @@ -56,40 +60,47 @@ public static void main(String[] args) throws Exception { // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + InspectConfig.FindingLimits findingLimits = + InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerItem(maxFindings).build(); + InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) - .setMaxFindings(maxFindings) + .setLimits(findingLimits) .setIncludeQuote(includeQuote) .build(); - ContentItem contentItem = - ContentItem.newBuilder().setType("text/plain").setValue(text).build(); + ByteContentItem byteContentItem = + ByteContentItem.newBuilder() + .setType(ByteContentItem.BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(text)) + .build(); + ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); + String projectId = ServiceOptions.getDefaultProjectId(); InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .setInspectConfig(inspectConfig) - .addItems(contentItem) + .setItem(contentItem) .build(); // Inspect the text for info types InspectContentResponse response = dlpServiceClient.inspectContent(request); - // Print the response - for (InspectResult result : response.getResultsList()) { - if (result.getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : result.getFindingsList()) { - if (includeQuote) { - System.out.print("Quote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); + InspectResult result = response.getResult(); + if (result.getFindingsCount() > 0) { + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + if (includeQuote) { + System.out.print("\tQuote: " + finding.getQuote()); } - } else { - System.out.println("No findings."); + System.out.print("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); } + } else { + System.out.println("No findings."); } } catch (Exception e) { System.out.println("Error in inspectString: " + e.getMessage()); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java index 0e738ca36b5..1ffd49fc90c 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java @@ -16,176 +16,145 @@ package com.example.dlp; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.privacy.dlp.v2beta1.ContentItem; -import com.google.privacy.dlp.v2beta1.InfoType; -import com.google.privacy.dlp.v2beta1.InspectConfig; -import com.google.privacy.dlp.v2beta1.Likelihood; -import com.google.privacy.dlp.v2beta1.RedactContentRequest; -import com.google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig; -import com.google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig; -import com.google.privacy.dlp.v2beta1.RedactContentResponse; +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; import com.google.protobuf.ByteString; import java.io.FileOutputStream; import java.net.URLConnection; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; import javax.activation.MimetypesFileTypeMap; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; public class Redact { - private static void redactString( - String string, String replacement, Likelihood minLikelihood, List infoTypes) - throws Exception { - // [START dlp_redact_string] - // Instantiate the DLP client - try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - // The minimum likelihood required before returning a match - // eg.minLikelihood = LIKELIHOOD_VERY_LIKELY; - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); - - ContentItem contentItem = - ContentItem.newBuilder() - .setType("text/plain") - .setData(ByteString.copyFrom(string.getBytes())) - .build(); - - List replaceConfigs = new ArrayList<>(); - - if (infoTypes.isEmpty()) { - // replace all detected sensitive elements with replacement string - replaceConfigs.add(ReplaceConfig.newBuilder().setReplaceWith(replacement).build()); - } else { - // Replace select info types with chosen replacement string - for (InfoType infoType : infoTypes) { - replaceConfigs.add( - ReplaceConfig.newBuilder().setInfoType(infoType).setReplaceWith(replacement).build()); - } - } - - RedactContentRequest request = RedactContentRequest.newBuilder() - .setInspectConfig(inspectConfig) - .addAllItems(Collections.singletonList(contentItem)) - .addAllReplaceConfigs(replaceConfigs) - .build(); - - RedactContentResponse contentResponse = dlpClient.redactContent(request); - for (ContentItem responseItem : contentResponse.getItemsList()) { - // print out string with redacted content - System.out.println(responseItem.getData().toStringUtf8()); - } - } - // [END dlp_redact_string] - } - + // [START dlp_redact_image] + /* + * Redact sensitive data from an image using the Data Loss Prevention API. + * + * @param filePath The path to a local file to inspect. Can be a JPG or PNG image file. + * @param minLikelihood The minimum likelihood required before redacting a match. + * @param infoTypes The infoTypes of information to redact. + * @param outputPath The local path to save the resulting image to. + * @param projectId The project ID to run the API call under. + */ private static void redactImage( - String filePath, Likelihood minLikelihood, List infoTypes, String outputPath) + String filePath, + Likelihood minLikelihood, + List infoTypes, + String outputPath, + String projectId) throws Exception { - // [START dlp_redact_image] + // Instantiate the DLP client try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - // The path to a local file to inspect. Can be a JPG or PNG image file. - // filePath = 'path/to/image.png' - // detect file mime type, default to application/octet-stream String mimeType = URLConnection.guessContentTypeFromName(filePath); if (mimeType == null) { mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); } - if (mimeType == null) { - mimeType = "application/octet-stream"; + + ByteContentItem.BytesType bytesType; + switch (mimeType) { + case "image/jpeg": + bytesType = ByteContentItem.BytesType.IMAGE_JPEG; + break; + case "image/bmp": + bytesType = ByteContentItem.BytesType.IMAGE_BMP; + break; + case "image/png": + bytesType = ByteContentItem.BytesType.IMAGE_PNG; + break; + case "image/svg": + bytesType = ByteContentItem.BytesType.IMAGE_SVG; + break; + default: + bytesType = ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED; + break; } byte[] data = Files.readAllBytes(Paths.get(filePath)); - // The minimum likelihood required before redacting a match - // minLikelihood = 'LIKELIHOOD_UNSPECIFIED' - - // The infoTypes of information to redact - // infoTypes = [{ name: 'EMAIL_ADDRESS' }, { name: 'PHONE_NUMBER' }] - - // The local path to save the resulting image to. - // outputPath = 'result.png' - InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) .build(); - ContentItem contentItem = - ContentItem.newBuilder().setType(mimeType).setData(ByteString.copyFrom(data)).build(); - - List imageRedactionConfigs = new ArrayList<>(); - for (InfoType infoType : infoTypes) { - // clear the specific info type if detected in the image - // use .setRedactionColor to color detected info type without clearing - ImageRedactionConfig imageRedactionConfig = - ImageRedactionConfig.newBuilder().setInfoType(infoType).clearTarget().build(); - imageRedactionConfigs.add(imageRedactionConfig); - } - RedactContentRequest redactContentRequest = - RedactContentRequest.newBuilder() - .setInspectConfig(inspectConfig) + + ByteContentItem byteContentItem = + ByteContentItem.newBuilder() + .setType(bytesType) + .setData(ByteString.copyFrom(data)) + .build(); + + List imageRedactionConfigs = + infoTypes + .stream() + .map( + infoType -> + RedactImageRequest.ImageRedactionConfig.newBuilder() + .setInfoType(infoType) + .build()) + .collect(Collectors.toList()); + + RedactImageRequest redactImageRequest = + RedactImageRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) .addAllImageRedactionConfigs(imageRedactionConfigs) - .addItems(contentItem) + .setByteItem(byteContentItem) + .setInspectConfig(inspectConfig) .build(); - RedactContentResponse contentResponse = dlpClient.redactContent(redactContentRequest); - for (ContentItem responseItem : contentResponse.getItemsList()) { - // redacted image data - ByteString redactedImageData = responseItem.getData(); - FileOutputStream outputStream = new FileOutputStream(outputPath); - outputStream.write(redactedImageData.toByteArray()); - outputStream.close(); - } - // [END dlp_redact_image] + RedactImageResponse redactImageResponse = dlpClient.redactImage(redactImageRequest); + + // redacted image data + ByteString redactedImageData = redactImageResponse.getRedactedImage(); + FileOutputStream outputStream = new FileOutputStream(outputPath); + outputStream.write(redactedImageData.toByteArray()); + outputStream.close(); } } + // [END dlp_redact_image] /** Command line application to redact strings, images using the Data Loss Prevention API. */ public static void main(String[] args) throws Exception { - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - Option stringOption = new Option("s", "string", true, "redact string"); - optionsGroup.addOption(stringOption); - - Option fileOption = new Option("f", "file path", true, "redact input file path"); - optionsGroup.addOption(fileOption); Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); Option minLikelihoodOption = Option.builder("minLikelihood").hasArg(true).required(false).build(); commandLineOptions.addOption(minLikelihoodOption); - Option replaceOption = - Option.builder("r").longOpt("replace string").hasArg(true).required(false).build(); - commandLineOptions.addOption(replaceOption); - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); infoTypesOption.setArgs(Option.UNLIMITED_VALUES); commandLineOptions.addOption(infoTypesOption); + Option inputFilePathOption = + Option.builder("f").hasArg(true).longOpt("inputFilePath").required(false).build(); + commandLineOptions.addOption(inputFilePathOption); + Option outputFilePathOption = Option.builder("o").hasArg(true).longOpt("outputFilePath").required(false).build(); + commandLineOptions.addOption(outputFilePathOption); + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; @@ -199,8 +168,6 @@ public static void main(String[] args) throws Exception { return; } - String replacement = cmd.getOptionValue(replaceOption.getOpt(), "_REDACTED_"); - List infoTypesList = new ArrayList<>(); String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); if (infoTypes != null) { @@ -213,14 +180,10 @@ public static void main(String[] args) throws Exception { cmd.getOptionValue( minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); - // string inspection - if (cmd.hasOption("s")) { - String source = cmd.getOptionValue(stringOption.getOpt()); - redactString(source, replacement, minLikelihood, infoTypesList); - } else if (cmd.hasOption("f")) { - String filePath = cmd.getOptionValue(fileOption.getOpt()); - String outputFilePath = cmd.getOptionValue(outputFilePathOption.getOpt()); - redactImage(filePath, minLikelihood, infoTypesList, outputFilePath); - } + String inputFilePath = cmd.getOptionValue(inputFilePathOption.getOpt()); + String outputFilePath = cmd.getOptionValue(outputFilePathOption.getOpt()); + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + redactImage(inputFilePath, minLikelihood, infoTypesList, outputFilePath, projectId); } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java index 853b902c555..161129d311b 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -16,30 +16,49 @@ package com.example.dlp; -import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.core.SettableApiFuture; import com.google.cloud.ServiceOptions; -import com.google.cloud.dlp.v2beta1.DlpServiceClient; -import com.google.longrunning.Operation; -import com.google.privacy.dlp.v2beta1.AnalyzeDataSourceRiskRequest; -import com.google.privacy.dlp.v2beta1.BigQueryTable; -import com.google.privacy.dlp.v2beta1.FieldId; -import com.google.privacy.dlp.v2beta1.PrivacyMetric; -import com.google.privacy.dlp.v2beta1.PrivacyMetric.CategoricalStatsConfig; -import com.google.privacy.dlp.v2beta1.PrivacyMetric.KAnonymityConfig; -import com.google.privacy.dlp.v2beta1.PrivacyMetric.LDiversityConfig; -import com.google.privacy.dlp.v2beta1.PrivacyMetric.NumericalStatsConfig; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationMetadata; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.CategoricalStatsResult.CategoricalStatsHistogramBucket; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityEquivalenceClass; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.KAnonymityResult.KAnonymityHistogramBucket; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityEquivalenceClass; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.LDiversityResult.LDiversityHistogramBucket; -import com.google.privacy.dlp.v2beta1.RiskAnalysisOperationResult.NumericalStatsResult; -import com.google.privacy.dlp.v2beta1.Value; -import com.google.privacy.dlp.v2beta1.ValueFrequency; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; +import com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; +import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; +import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; +import com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; +import com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.Value; +import com.google.privacy.dlp.v2.ValueFrequency; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -52,114 +71,151 @@ public class RiskAnalysis { - private static void calculateNumericalStats( - String projectId, String datasetId, String tableId, String columnName) + // [START dlp_numerical_stats] + /** + * Calculate numerical statistics for a column in a BigQuery table using the DLP API. + * + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param columnName The name of the column to analyze, which must contain only numerical data. + * @param topicId The name of the Pub/Sub topic to notify once the job completes + * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job + * completion status. + */ + private static void numericalStatsAnalysis( + String projectId, + String datasetId, + String tableId, + String columnName, + String topicId, + String subscriptionId) throws Exception { - // [START dlp_numerical_stats] - /** - * Calculate numerical statistics for a column in a BigQuery table using the DLP API. - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param columnName The name of the column to analyze, which must contain only numerical data. - */ - - // instantiate a client + // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // projectId = process.env.GCLOUD_PROJECT; - // datasetId = "my_dataset"; - // tableId = "my_table"; - // columnName = "firstName"; - - FieldId fieldId = - FieldId.newBuilder() - .setColumnName(columnName) - .build(); - - NumericalStatsConfig numericalStatsConfig = - NumericalStatsConfig.newBuilder() - .setField(fieldId) - .build(); - BigQueryTable bigQueryTable = BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) .setTableId(tableId) + .setDatasetId(datasetId) + .setProjectId(projectId) .build(); + FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); + + NumericalStatsConfig numericalStatsConfig = + NumericalStatsConfig.newBuilder().setField(fieldId).build(); + PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder() - .setNumericalStatsConfig(numericalStatsConfig) - .build(); + PrivacyMetric.newBuilder().setNumericalStatsConfig(numericalStatsConfig).build(); - AnalyzeDataSourceRiskRequest request = - AnalyzeDataSourceRiskRequest.newBuilder() - .setPrivacyMetric(privacyMetric) - .setSourceTable(bigQueryTable) - .build(); + String topicName = String.format("projects/%s/topics/%s", projectId, topicId); - // asynchronously submit a risk analysis operation - OperationFuture - responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); + PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); - // ... - // block on response - RiskAnalysisOperationResult response = responseFuture.get(); - NumericalStatsResult results = - response.getNumericalStatsResult(); + // Create action to publish job status notifications over Google Cloud Pub/Sub + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); - System.out.println( - "Value range: [" + results.getMaxValue() + ", " + results.getMinValue() + "]"); + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); - // Print out unique quantiles - String previousValue = ""; - for (int i = 0; i < results.getQuantileValuesCount(); i++) { - Value valueObj = results.getQuantileValues(i); - String value = valueObj.toString(); + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + String dlpJobName = dlpJob.getName(); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.newBuilder() + .setProject(projectId) + .setSubscription(subscriptionId) + .build(), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } - if (!previousValue.equals(value)) { - System.out.println("Value at " + i + "% quantile: " + value.toString()); - previousValue = value; + // Retrieve completed job status + DlpJob completedJob = + dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); + + System.out.println("Job status: " + completedJob.getState()); + AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); + AnalyzeDataSourceRiskDetails.NumericalStatsResult result = + riskDetails.getNumericalStatsResult(); + + System.out.printf( + "Value range : [%.3f, %.3f]\n", + result.getMinValue().getFloatValue(), result.getMaxValue().getFloatValue()); + + int percent = 1; + Double lastValue = null; + for (Value quantileValue : result.getQuantileValuesList()) { + Double currentValue = quantileValue.getFloatValue(); + if (lastValue == null || !lastValue.equals(currentValue)) { + System.out.printf("Value at %s %% quantile : %.3f", percent, currentValue); } + lastValue = currentValue; } } catch (Exception e) { - System.out.println("Error in numericalStatsAnalysis: " + e.getMessage()); + System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); } - // [END dlp_numerical_stats] } + // [END dlp_numerical_stats] - private static void calculateCategoricalStats( - String projectId, String datasetId, String tableId, String columnName) - throws Exception { - // [START dlp_categorical_stats] - /** - * Calculate categorical statistics for a column in a BigQuery table using the DLP API. - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param columnName The name of the column to analyze, which need not contain numerical data. - */ - - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // [START dlp_categorical_stats] + /** + * Calculate categorical statistics for a column in a BigQuery table using the DLP API. + * + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param columnName The name of the column to analyze, which need not contain numerical data. + * @param topicId The name of the Pub/Sub topic to notify once the job completes + * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job + * completion status. + */ + private static void categoricalStatsAnalysis( + String projectId, + String datasetId, + String tableId, + String columnName, + String topicId, + String subscriptionId) { - // projectId = process.env.GCLOUD_PROJECT; - // datasetId = "my_dataset"; - // tableId = "my_table"; - // columnName = "firstName"; + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - FieldId fieldId = - FieldId.newBuilder() - .setColumnName(columnName) - .build(); + FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); CategoricalStatsConfig categoricalStatsConfig = - CategoricalStatsConfig.newBuilder() - .setField(fieldId) - .build(); + CategoricalStatsConfig.newBuilder().setField(fieldId).build(); BigQueryTable bigQueryTable = BigQueryTable.newBuilder() @@ -169,76 +225,119 @@ private static void calculateCategoricalStats( .build(); PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder() - .setCategoricalStatsConfig(categoricalStatsConfig) - .build(); + PrivacyMetric.newBuilder().setCategoricalStatsConfig(categoricalStatsConfig).build(); - AnalyzeDataSourceRiskRequest request = - AnalyzeDataSourceRiskRequest.newBuilder() - .setPrivacyMetric(privacyMetric) + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) .build(); - // asynchronously submit a risk analysis operation - OperationFuture - responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); - - // ... - // block on response - RiskAnalysisOperationResult response = responseFuture.get(); - CategoricalStatsHistogramBucket results = - response.getCategoricalStatsResult().getValueFrequencyHistogramBuckets(0); - - System.out.println( - "Most common value occurs " + results.getValueFrequencyUpperBound() + " time(s)"); - System.out.println( - "Least common value occurs " + results.getValueFrequencyLowerBound() + " time(s)"); - - for (ValueFrequency valueFrequency : results.getBucketValuesList()) { - System.out.println("Value " - + valueFrequency.getValue().toString() - + " occurs " - + valueFrequency.getCount() - + " time(s)." - ); + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + String dlpJobName = dlpJob.getName(); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.newBuilder() + .setProject(projectId) + .setSubscription(subscriptionId) + .build(), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); } + // Retrieve completed job status + DlpJob completedJob = + dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); + + System.out.println("Job status: " + completedJob.getState()); + AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); + AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = + riskDetails.getCategoricalStatsResult(); + + for (CategoricalStatsHistogramBucket bucket : + result.getValueFrequencyHistogramBucketsList()) { + System.out.printf( + "Most common value occurs %d time(s).\n", bucket.getValueFrequencyUpperBound()); + System.out.printf( + "Least common value occurs %d time(s).\n", bucket.getValueFrequencyLowerBound()); + for (ValueFrequency valueFrequency : bucket.getBucketValuesList()) { + System.out.printf( + "Value %s occurs %d time(s).\n", + valueFrequency.getValue().toString(), valueFrequency.getCount()); + } + } } catch (Exception e) { System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); } - // [END dlp_categorical_stats] } + // [END dlp_categorical_stats] + // [START dlp_k_anonymity] + /** + * Calculate k-anonymity for quasi-identifiers in a BigQuery table using the DLP API. + * + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param quasiIds The names of columns that form a composite key ('quasi-identifiers'). + * @param topicId The name of the Pub/Sub topic to notify once the job completes + * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job + * completion status. + */ private static void calculateKAnonymity( - String projectId, String datasetId, String tableId, List quasiIds) + String projectId, + String datasetId, + String tableId, + List quasiIds, + String topicId, + String subscriptionId) throws Exception { - // [START dlp_k_anonymity] - /** - * Calculate k-anonymity for quasi-identifiers in a BigQuery table using the DLP API. - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param quasiIds The names of columns that form a composite key ('quasi-identifiers'). - */ - - // instantiate a client + // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // projectId = process.env.GCLOUD_PROJECT; - // datasetId = 'my_dataset'; - // tableId = 'my_table'; - // quasiIds = [{ columnName: 'age' }, { columnName: 'city' }]; - List quasiIdFields = quasiIds .stream() - .map(columnName -> FieldId.newBuilder().setColumnName(columnName).build()) + .map(columnName -> FieldId.newBuilder().setName(columnName).build()) .collect(Collectors.toList()); KAnonymityConfig kanonymityConfig = - KAnonymityConfig.newBuilder() - .addAllQuasiIds(quasiIdFields) - .build(); + KAnonymityConfig.newBuilder().addAllQuasiIds(quasiIdFields).build(); BigQueryTable bigQueryTable = BigQueryTable.newBuilder() @@ -248,83 +347,124 @@ private static void calculateKAnonymity( .build(); PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder() - .setKAnonymityConfig(kanonymityConfig) - .build(); + PrivacyMetric.newBuilder().setKAnonymityConfig(kanonymityConfig).build(); - AnalyzeDataSourceRiskRequest request = - AnalyzeDataSourceRiskRequest.newBuilder() - .setPrivacyMetric(privacyMetric) + String topicName = String.format("projects/%s/topics/%s", projectId, topicId); + + PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) .build(); - // asynchronously submit a risk analysis operation - OperationFuture - responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); - - // ... - // block on response - RiskAnalysisOperationResult response = responseFuture.get(); - KAnonymityHistogramBucket results = - response.getKAnonymityResult().getEquivalenceClassHistogramBuckets(0); - - System.out.println("Bucket size range: [" - + results.getEquivalenceClassSizeLowerBound() - + ", " - + results.getEquivalenceClassSizeUpperBound() - + "]" - ); - - for (KAnonymityEquivalenceClass bucket : results.getBucketValuesList()) { - List quasiIdValues = bucket.getQuasiIdsValuesList() - .stream() - .map(v -> v.toString()) - .collect(Collectors.toList()); - - System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); - System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + String dlpJobName = dlpJob.getName(); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.newBuilder() + .setProject(projectId) + .setSubscription(subscriptionId) + .build(), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Retrieve completed job status + DlpJob completedJob = + dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); + + System.out.println("Job status: " + completedJob.getState()); + AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); + + KAnonymityResult kanonymityResult = riskDetails.getKAnonymityResult(); + for (KAnonymityHistogramBucket result : + kanonymityResult.getEquivalenceClassHistogramBucketsList()) { + System.out.printf( + "Bucket size range: [%d, %d]\n", + result.getEquivalenceClassSizeLowerBound(), result.getEquivalenceClassSizeUpperBound()); + + for (KAnonymityEquivalenceClass bucket : result.getBucketValuesList()) { + List quasiIdValues = + bucket + .getQuasiIdsValuesList() + .stream() + .map(v -> v.toString()) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + } } } catch (Exception e) { - System.out.println("Error in kAnonymityAnalysis: " + e.getMessage()); + System.out.println("Error in calculateKAnonymity: " + e.getMessage()); } - // [END dlp_k_anonymity] } + // [END dlp_k_anonymity] + // [START dlp_l_diversity] + /** + * Calculate l-diversity for an attribute relative to quasi-identifiers in a BigQuery table. + * + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param sensitiveAttribute The name of the attribute to compare the quasi-ID against + * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). + * @param topicId The name of the Pub/Sub topic to notify once the job completes + * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job + * completion status. + */ private static void calculateLDiversity( String projectId, String datasetId, String tableId, String sensitiveAttribute, - List quasiIds - ) throws Exception { - // [START dlp_l_diversity] - /** - * Calculate l-diversity for an attribute relative to quasi-identifiers in a BigQuery table. - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param sensitiveAttribute The name of the attribute to compare the quasi-ID against - * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). - */ - - // instantiate a client + List quasiIds, + String topicId, + String subscriptionId) + throws Exception { + + // Instantiates a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // projectId = process.env.GCLOUD_PROJECT; - // datasetId = "my_dataset"; - // tableId = "my_table"; - // sensitiveAttribute = "name"; - // quasiIds = [{ columnName: "age" }, { columnName: "city" }]; - - FieldId sensitiveAttributeField = - FieldId.newBuilder() - .setColumnName(sensitiveAttribute) - .build(); + FieldId sensitiveAttributeField = FieldId.newBuilder().setName(sensitiveAttribute).build(); List quasiIdFields = quasiIds .stream() - .map(columnName -> FieldId.newBuilder().setColumnName(columnName).build()) + .map(columnName -> FieldId.newBuilder().setName(columnName).build()) .collect(Collectors.toList()); LDiversityConfig ldiversityConfig = @@ -341,53 +481,248 @@ private static void calculateLDiversity( .build(); PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder() - .setLDiversityConfig(ldiversityConfig) - .build(); + PrivacyMetric.newBuilder().setLDiversityConfig(ldiversityConfig).build(); - AnalyzeDataSourceRiskRequest request = - AnalyzeDataSourceRiskRequest.newBuilder() - .setPrivacyMetric(privacyMetric) + String topicName = String.format("projects/%s/topics/%s", projectId, topicId); + + PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) .build(); - // asynchronously submit a risk analysis operation - OperationFuture - responseFuture = dlpServiceClient.analyzeDataSourceRiskAsync(request); - - // ... - // block on response - RiskAnalysisOperationResult response = responseFuture.get(); - LDiversityHistogramBucket results = - response.getLDiversityResult().getSensitiveValueFrequencyHistogramBuckets(0); - - for (LDiversityEquivalenceClass bucket : results.getBucketValuesList()) { - List quasiIdValues = bucket.getQuasiIdsValuesList() - .stream() - .map(v -> v.toString()) - .collect(Collectors.toList()); - - System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); - System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); - - for (ValueFrequency valueFrequency : bucket.getTopSensitiveValuesList()) { - System.out.println("\t\tSensitive value " - + valueFrequency.getValue().toString() - + " occurs " - + valueFrequency.getCount() - + " time(s)."); + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + String dlpJobName = dlpJob.getName(); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.newBuilder() + .setProject(projectId) + .setSubscription(subscriptionId) + .build(), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // retrieve completed job status + DlpJob completedJob = + dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); + + System.out.println("Job status: " + completedJob.getState()); + AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); + + LDiversityResult ldiversityResult = riskDetails.getLDiversityResult(); + for (LDiversityHistogramBucket result : + ldiversityResult.getSensitiveValueFrequencyHistogramBucketsList()) { + for (LDiversityEquivalenceClass bucket : result.getBucketValuesList()) { + List quasiIdValues = + bucket + .getQuasiIdsValuesList() + .stream() + .map(Value::toString) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + + for (ValueFrequency valueFrequency : bucket.getTopSensitiveValuesList()) { + System.out.printf( + "\t\tSensitive value %s occurs %d time(s).\n", + valueFrequency.getValue().toString(), valueFrequency.getCount()); + } } } } catch (Exception e) { - System.out.println("Error in lDiversityAnalysis: " + e.getMessage()); + System.out.println("Error in calculateLDiversity: " + e.getMessage()); } - // [END dlp_l_diversity] } + // [END dlp_l_diversity] + + // [START dlp_k_map] + /** + * Calculate k-map risk estimation for an attribute relative to quasi-identifiers in a BigQuery + * table. + * + * @param projectId The Google Cloud Platform project ID to run the API call under. + * @param datasetId The BigQuery dataset to analyze. + * @param tableId The BigQuery table to analyze. + * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). + * @param infoTypes The infoTypes corresponding to each quasi-id column + * @param regionCode An ISO-3166-1 region code specifying the k-map distribution region + * @param topicId The name of the Pub/Sub topic to notify once the job completes + * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job + * completion status. + */ + private static void calculateKMap( + String projectId, + String datasetId, + String tableId, + List quasiIds, + List infoTypes, + String regionCode, + String topicId, + String subscriptionId) + throws Exception { + + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + Iterator quasiIdsIterator = quasiIds.iterator(); + Iterator infoTypesIterator = infoTypes.iterator(); + + if (quasiIds.size() != infoTypes.size()) { + throw new IllegalArgumentException("The numbers of quasi-IDs and infoTypes must be equal!"); + } + + ArrayList taggedFields = new ArrayList(); + + while (quasiIdsIterator.hasNext() || infoTypesIterator.hasNext()) { + taggedFields.add( + TaggedField.newBuilder() + .setField(FieldId.newBuilder().setName(quasiIdsIterator.next()).build()) + .setInfoType(infoTypesIterator.next()) + .build()); + } + + KMapEstimationConfig kmapConfig = + KMapEstimationConfig.newBuilder() + .addAllQuasiIds(taggedFields) + .setRegionCode(regionCode) + .build(); + + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setKMapEstimationConfig(kmapConfig).build(); + + String topicName = String.format("projects/%s/topics/%s", projectId, topicId); + + PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + String dlpJobName = dlpJob.getName(); + + final SettableApiFuture done = SettableApiFuture.create(); + + // Set up a Pub/Sub subscriber to listen on the job completion status + Subscriber subscriber = + Subscriber.newBuilder( + ProjectSubscriptionName.newBuilder() + .setProject(projectId) + .setSubscription(subscriptionId) + .build(), + (pubsubMessage, ackReplyConsumer) -> { + if (pubsubMessage.getAttributesCount() > 0 + && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { + // notify job completion + done.set(true); + ackReplyConsumer.ack(); + } + }) + .build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + // retrieve completed job status + DlpJob completedJob = + dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); + + System.out.println("Job status: " + completedJob.getState()); + AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); + + KMapEstimationResult kmapResult = riskDetails.getKMapEstimationResult(); + for (KMapEstimationHistogramBucket result : kmapResult.getKMapEstimationHistogramList()) { + + System.out.printf( + "\tAnonymity range: [%d, %d]\n", result.getMinAnonymity(), result.getMaxAnonymity()); + System.out.printf("\tSize: %d\n", result.getBucketSize()); + + for (KMapEstimationQuasiIdValues valueBucket : result.getBucketValuesList()) { + String quasiIdValues = + valueBucket + .getQuasiIdsValuesList() + .stream() + .map( + v -> { + String s = v.toString(); + return s.substring(s.indexOf(':') + 1).trim(); + }) + .collect(Collectors.joining(", ")); + + System.out.printf("\tValues: {%s}\n", quasiIdValues); + System.out.printf( + "\tEstimated k-map anonymity: %d\n", valueBucket.getEstimatedAnonymity()); + } + } + } catch (Exception e) { + System.out.println("Error in calculateKMap: " + e.getMessage()); + } + } + // [END dlp_k_map] /** - * Command line application to perform risk analysis using the Data Loss Prevention API. - * Supported data format: BigQuery tables + * Command line application to perform risk analysis using the Data Loss Prevention API. Supported + * data format: BigQuery tables */ public static void main(String[] args) throws Exception { @@ -400,9 +735,12 @@ public static void main(String[] args) throws Exception { Option categoricalAnalysisOption = new Option("c", "categorical"); optionsGroup.addOption(categoricalAnalysisOption); - Option kanonymityOption = new Option("k", "kAnonymity"); + Option kanonymityOption = new Option("a", "kAnonymity"); optionsGroup.addOption(kanonymityOption); + Option kmapOption = new Option("m", "kAnonymity"); + optionsGroup.addOption(kmapOption); + Option ldiversityOption = new Option("l", "lDiversity"); optionsGroup.addOption(ldiversityOption); @@ -418,18 +756,32 @@ public static void main(String[] args) throws Exception { Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); commandLineOptions.addOption(projectIdOption); - Option columnNameOption = - Option.builder("columnName").hasArg(true).required(false).build(); + Option topicIdOption = Option.builder("topicId").hasArg(true).required(false).build(); + commandLineOptions.addOption(topicIdOption); + + Option subscriptionIdOption = + Option.builder("subscriptionId").hasArg(true).required(false).build(); + commandLineOptions.addOption(subscriptionIdOption); + + Option columnNameOption = Option.builder("columnName").hasArg(true).required(false).build(); commandLineOptions.addOption(columnNameOption); Option sensitiveAttributeOption = Option.builder("sensitiveAttribute").hasArg(true).required(false).build(); commandLineOptions.addOption(sensitiveAttributeOption); + Option regionCodeOption = Option.builder("regionCode").hasArg(true).required(false).build(); + commandLineOptions.addOption(regionCodeOption); + Option quasiIdColumnNamesOption = Option.builder("quasiIdColumnNames").hasArg(true).required(false).build(); + quasiIdColumnNamesOption.setArgs(Option.UNLIMITED_VALUES); commandLineOptions.addOption(quasiIdColumnNamesOption); + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; @@ -447,28 +799,62 @@ public static void main(String[] args) throws Exception { String tableId = cmd.getOptionValue(tableIdOption.getOpt()); // use default project id when project id is not specified String projectId = - cmd.getOptionValue( - projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + + String regionCode = cmd.getOptionValue(regionCodeOption.getOpt(), "US"); + + String topicId = cmd.getOptionValue(topicIdOption.getOpt()); + String subscriptionId = cmd.getOptionValue(subscriptionIdOption.getOpt()); + + List infoTypesList = Collections.emptyList(); + if (cmd.hasOption(infoTypesOption.getOpt())) { + infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } if (cmd.hasOption("n")) { // numerical stats analysis String columnName = cmd.getOptionValue(columnNameOption.getOpt()); - calculateNumericalStats(projectId, datasetId, tableId, columnName); + numericalStatsAnalysis(projectId, datasetId, tableId, columnName, topicId, subscriptionId); } else if (cmd.hasOption("c")) { // categorical stats analysis String columnName = cmd.getOptionValue(columnNameOption.getOpt()); - calculateCategoricalStats(projectId, datasetId, tableId, columnName); - } else if (cmd.hasOption("k")) { + categoricalStatsAnalysis(projectId, datasetId, tableId, columnName, topicId, subscriptionId); + } else if (cmd.hasOption("a")) { // k-anonymity analysis List quasiIdColumnNames = Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); - calculateKAnonymity(projectId, datasetId, tableId, quasiIdColumnNames); + calculateKAnonymity( + projectId, datasetId, tableId, quasiIdColumnNames, topicId, subscriptionId); + } else if (cmd.hasOption("m")) { + // k-map analysis + List quasiIdColumnNames = + Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); + calculateKMap( + projectId, + datasetId, + tableId, + quasiIdColumnNames, + infoTypesList, + regionCode, + topicId, + subscriptionId); } else if (cmd.hasOption("l")) { // l-diversity analysis String sensitiveAttribute = cmd.getOptionValue(sensitiveAttributeOption.getOpt()); List quasiIdColumnNames = Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); - calculateLDiversity(projectId, datasetId, tableId, sensitiveAttribute, quasiIdColumnNames); + calculateLDiversity( + projectId, + datasetId, + tableId, + sensitiveAttribute, + quasiIdColumnNames, + topicId, + subscriptionId); } } } diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java new file mode 100644 index 00000000000..da4c5eb88c6 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java @@ -0,0 +1,263 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPage; +import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectConfig.FindingLimits; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ProjectName; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class Templates { + + // [START dlp_create_inspect_template] + /** + * Create a new DLP inspection configuration template. + * + * @param displayName (Optional) The human-readable name to give the template + * @param projectId Google Cloud Project ID to call the API under + * @param templateId (Optional) The name of the template to be created + * @param infoTypeList The infoTypes of information to match + * @param minLikelihood The minimum likelihood required before returning a match + * @param maxFindings The maximum number of findings to report per request (0 = server maximum) + */ + private static void createInspectTemplate( + String displayName, + String templateId, + String description, + String projectId, + List infoTypeList, + Likelihood minLikelihood, + int maxFindings) { + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + FindingLimits findingLimits = + FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); + + // Construct the inspection configuration for the template + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypeList) + .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) + .build(); + + InspectTemplate inspectTemplate = + InspectTemplate.newBuilder() + .setInspectConfig(inspectConfig) + .setDisplayName(displayName) + .setDescription(description) + .build(); + + CreateInspectTemplateRequest createInspectTemplateRequest = + CreateInspectTemplateRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectTemplate(inspectTemplate) + .setTemplateId(templateId) + .build(); + + InspectTemplate response = + dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); + System.out.printf("Template created: %s", response.getName()); + } catch (Exception e) { + System.out.printf("Error creating template: %s", e.getMessage()); + } + } + // [END dlp_create_inspect_template] + + // [START dlp_list_inspect_templates] + /** + * List DLP inspection templates created in a given project + * + * @param projectId Google Cloud Project ID + */ + private static void listInspectTemplates(String projectId) { + + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setPageSize(1) + .build(); + + ListInspectTemplatesPagedResponse response = dlpServiceClient.listInspectTemplates(request); + ListInspectTemplatesPage page = response.getPage(); + ListInspectTemplatesResponse templatesResponse = page.getResponse(); + + for (InspectTemplate template : templatesResponse.getInspectTemplatesList()) { + System.out.printf("Template name: %s\n", template.getName()); + if (template.getDisplayName() != null) { + System.out.printf("\tDisplay name: %s \n", template.getDisplayName()); + System.out.printf("\tCreate time: %s \n", template.getCreateTime()); + System.out.printf("\tUpdate time: %s \n", template.getUpdateTime()); + + // print inspection config + InspectConfig inspectConfig = template.getInspectConfig(); + for (InfoType infoType : inspectConfig.getInfoTypesList()) { + System.out.printf("\tInfoType: %s\n", infoType.getName()); + } + System.out.printf("\tMin likelihood: %s\n", inspectConfig.getMinLikelihood()); + System.out.printf("\tLimits: %s\n", inspectConfig.getLimits().getMaxFindingsPerRequest()); + } + } + } catch (Exception e) { + System.out.printf("Error creating template: %s", e.getMessage()); + } + } + // [END dlp_list_inspect_templates] + + // [START dlp_delete_inspect_template] + /** + * Delete the DLP inspection configuration template with the specified name. + * + * @param projectId Google Cloud Project ID + * @param templateId Template ID to be deleted + */ + private static void deleteInspectTemplate(String projectId, String templateId) { + + // construct the template name to be deleted + String templateName = String.format("projects/%s/inspectTemplates/%s", projectId, templateId); + // instantiate the client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // create delete template request + DeleteInspectTemplateRequest request = + DeleteInspectTemplateRequest.newBuilder().setName(templateName).build(); + + dlpServiceClient.deleteInspectTemplate(request); + System.out.printf("Deleted template: %s\n", templateName); + } catch (Exception e) { + System.err.printf("Error deleting template: %s\n", templateName); + } + } + // [END dlp_delete_inspect_template] + + /** Command line application to create, list and delete DLP inspect templates. */ + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + + Option createOption = new Option("c", "create", false, "Create inspect template"); + optionsGroup.addOption(createOption); + + Option listOption = new Option("l", "list", false, "List inspect templates"); + optionsGroup.addOption(listOption); + + Option deleteOption = new Option("d", "delete", false, "Delete inspect template"); + optionsGroup.addOption(deleteOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); + commandLineOptions.addOption(projectIdOption); + + Option minLikelihoodOption = + Option.builder("minLikelihood").hasArg(true).required(false).build(); + commandLineOptions.addOption(minLikelihoodOption); + + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + + Option templateIdOption = Option.builder("templateId").hasArg(true).required(false).build(); + commandLineOptions.addOption(templateIdOption); + + Option templateDescription = Option.builder("description").hasArg(true).required(false).build(); + commandLineOptions.addOption(templateDescription); + + Option templateDisplayNameOption = + Option.builder("displayName").hasArg(true).required(false).build(); + commandLineOptions.addOption(templateDisplayNameOption); + + Option includeQuoteOption = Option.builder("includeQuote").hasArg(true).required(false).build(); + commandLineOptions.addOption(includeQuoteOption); + + Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); + commandLineOptions.addOption(maxFindingsOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(Redact.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + + if (cmd.hasOption(createOption.getOpt())) { + String templateId = cmd.getOptionValue(templateIdOption.getOpt()); + String displayName = cmd.getOptionValue(templateDisplayNameOption.getOpt()); + String description = cmd.getOptionValue(templateDescription.getOpt()); + + Likelihood minLikelihood = + Likelihood.valueOf( + cmd.getOptionValue( + minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); + + List infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + if (infoTypes != null) { + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } + int maxFindings = Integer.valueOf(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); + createInspectTemplate( + displayName, + templateId, + description, + projectId, + infoTypesList, + minLikelihood, + maxFindings); + + } else if (cmd.hasOption(listOption.getOpt())) { + listInspectTemplates(projectId); + } else if (cmd.hasOption(deleteOption.getOpt())) { + String templateId = cmd.getOptionValue(templateIdOption.getOpt()); + deleteInspectTemplate(projectId, templateId); + } + } +} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java new file mode 100644 index 00000000000..c6e180d58dc --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java @@ -0,0 +1,299 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import com.google.cloud.ServiceOptions; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ProjectJobTriggerName; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.Schedule; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.protobuf.Duration; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.OptionGroup; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +public class Triggers { + + // [START dlp_create_trigger] + /** + * Schedule a DLP inspection trigger for a GCS location. + * + * @param triggerId (Optional) name of the trigger to be created + * @param displayName (Optional) display name for the trigger to be created + * @param description (Optional) description for the trigger to be created + * @param scanPeriod How often to wait between scans, in days (minimum = 1 day) + * @param infoTypes infoTypes of information to match eg. InfoType.PHONE_NUMBER, + * InfoType.EMAIL_ADDRESS + * @param minLikelihood minimum likelihood required before returning a match + * @param maxFindings maximum number of findings to report per request (0 = server maximum) + * @param projectId The project ID to run the API call under + */ + private static void createTrigger( + String triggerId, + String displayName, + String description, + String bucketName, + String fileName, + int scanPeriod, + List infoTypes, + Likelihood minLikelihood, + int maxFindings, + String projectId) + throws Exception { + + // instantiate a client + DlpServiceClient dlpServiceClient = DlpServiceClient.create(); + try { + + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet( + CloudStorageOptions.FileSet.newBuilder() + .setUrl("gs://" + bucketName + "/" + fileName)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + InspectConfig.FindingLimits findingLimits = + InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) + .build(); + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(inspectConfig) + .setStorageConfig(storageConfig) + .build(); + + // Schedule scan of GCS bucket every scanPeriod number of days (minimum = 1 day) + Duration duration = Duration.newBuilder().setSeconds(scanPeriod * 24 * 3600).build(); + Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); + JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); + JobTrigger jobTrigger = + JobTrigger.newBuilder() + .setInspectJob(inspectJobConfig) + .setName(triggerId) + .setDisplayName(displayName) + .setDescription(description) + .setStatus(JobTrigger.Status.HEALTHY) + .addTriggers(trigger) + .build(); + + // Create scan request + CreateJobTriggerRequest createJobTriggerRequest = + CreateJobTriggerRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setJobTrigger(jobTrigger) + .build(); + + JobTrigger createdJobTrigger = dlpServiceClient.createJobTrigger(createJobTriggerRequest); + + System.out.println("Created Trigger: " + createdJobTrigger.getName()); + } catch (Exception e) { + System.out.println("Error creating trigger: " + e.getMessage()); + } + } + // [END dlp_create_trigger] + + // [START dlp_list_triggers] + /** + * List all DLP triggers for a given project. + * + * @param projectId The project ID to run the API call under. + */ + private static void listTriggers(String projectId) { + // Instantiates a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + ListJobTriggersRequest listJobTriggersRequest = + ListJobTriggersRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .build(); + DlpServiceClient.ListJobTriggersPagedResponse response = + dlpServiceClient.listJobTriggers(listJobTriggersRequest); + response + .getPage() + .getValues() + .forEach( + trigger -> { + System.out.println("Trigger: " + trigger.getName()); + System.out.println("\tCreated: " + trigger.getCreateTime()); + System.out.println("\tUpdated: " + trigger.getUpdateTime()); + if (trigger.getDisplayName() != null) { + System.out.println("\tDisplay name: " + trigger.getDisplayName()); + } + if (trigger.getDescription() != null) { + System.out.println("\tDescription: " + trigger.getDescription()); + } + System.out.println("\tStatus: " + trigger.getStatus()); + System.out.println("\tError count: " + trigger.getErrorsCount()); + }); + } catch (Exception e) { + System.out.println("Error listing triggers :" + e.getMessage()); + } + } + // [END dlp_list_triggers] + + // [START dlp_delete_trigger] + /** + * Delete a DLP trigger in a project. + * + * @param projectId The project ID to run the API call under. + * @param triggerId Trigger ID + */ + private static void deleteTrigger(String projectId, String triggerId) { + + ProjectJobTriggerName triggerName = ProjectJobTriggerName.of(projectId, triggerId); + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + DeleteJobTriggerRequest deleteJobTriggerRequest = + DeleteJobTriggerRequest.newBuilder().setName(triggerName.toString()).build(); + dlpServiceClient.deleteJobTrigger(deleteJobTriggerRequest); + + System.out.println("Trigger deleted: " + triggerName.toString()); + } catch (Exception e) { + System.out.println("Error deleting trigger :" + e.getMessage()); + } + } + // [END dlp_delete_trigger] + + /** Command line application to crate, list and delete triggers. */ + public static void main(String[] args) throws Exception { + + OptionGroup optionsGroup = new OptionGroup(); + optionsGroup.setRequired(true); + + Option createTriggerOption = + new Option("c", "create", false, "Create trigger to scan a GCS bucket"); + optionsGroup.addOption(createTriggerOption); + + Option listTriggersOption = new Option("l", "list", false, "List triggers"); + optionsGroup.addOption(listTriggersOption); + + Option deleteTriggerOption = new Option("d", "delete", false, "Delete trigger"); + optionsGroup.addOption(deleteTriggerOption); + + Options commandLineOptions = new Options(); + commandLineOptions.addOptionGroup(optionsGroup); + + Option bucketNameOption = Option.builder("bucketName").hasArg(true).required(false).build(); + commandLineOptions.addOption(bucketNameOption); + + Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); + commandLineOptions.addOption(gcsFileNameOption); + + Option minLikelihoodOption = + Option.builder("minLikelihood").hasArg(true).required(false).build(); + + commandLineOptions.addOption(minLikelihoodOption); + + Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); + + commandLineOptions.addOption(maxFindingsOption); + + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + + Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); + commandLineOptions.addOption(projectIdOption); + + Option triggerIdOption = Option.builder("triggerId").hasArg(true).required(false).build(); + commandLineOptions.addOption(triggerIdOption); + Option displayNameOption = Option.builder("displayName").hasArg(true).required(false).build(); + commandLineOptions.addOption(displayNameOption); + Option descriptionOption = Option.builder("description").hasArg(true).required(false).build(); + commandLineOptions.addOption(descriptionOption); + + Option scanPeriodOption = Option.builder("scanPeriod").hasArg(true).required(false).build(); + commandLineOptions.addOption(scanPeriodOption); + + CommandLineParser parser = new DefaultParser(); + HelpFormatter formatter = new HelpFormatter(); + CommandLine cmd; + + try { + cmd = parser.parse(commandLineOptions, args); + } catch (ParseException e) { + System.out.println(e.getMessage()); + formatter.printHelp(DeIdentification.class.getName(), commandLineOptions); + System.exit(1); + return; + } + + String projectId = + cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + if (cmd.hasOption("c")) { + Likelihood minLikelihood = + Likelihood.valueOf( + cmd.getOptionValue( + minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); + int maxFindings = Integer.parseInt(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); + String triggerId = cmd.getOptionValue(triggerIdOption.getOpt()); + String displayName = cmd.getOptionValue(displayNameOption.getOpt(), ""); + String description = cmd.getOptionValue(descriptionOption.getOpt(), ""); + String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); + String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); + int scanPeriod = Integer.valueOf(cmd.getOptionValue(scanPeriodOption.getOpt())); + List infoTypesList = new ArrayList<>(); + if (cmd.hasOption(infoTypesOption.getOpt())) { + infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } + createTrigger( + triggerId, + displayName, + description, + bucketName, + fileName, + scanPeriod, + infoTypesList, + minLikelihood, + maxFindings, + projectId); + } else if (cmd.hasOption("l")) { + // list triggers + listTriggers(projectId); + } else if (cmd.hasOption("d")) { + String triggerId = cmd.getOptionValue(triggerIdOption.getOpt()); + deleteTrigger(projectId, triggerId); + } + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java index d31708c568a..ec796c60bbb 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java @@ -16,14 +16,17 @@ package com.example.dlp; -import static org.junit.Assert.assertEquals; +import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import java.util.regex.Pattern; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.Arrays; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -31,9 +34,10 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class DeIdentificationIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + + // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; @@ -47,7 +51,7 @@ public class DeIdentificationIT { public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); - System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH + System.setOut(out); assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); @@ -56,26 +60,88 @@ public void setUp() { @Test public void testDeidStringMasksCharacters() throws Exception { String text = "\"My SSN is 372819127\""; - DeIdentification.main(new String[] { - "-m", text, - "-maskingCharacter", "x", - "-numberToMask", "5" - }); + DeIdentification.main( + new String[] { + "-m", text, + "-maskingCharacter", "x", + "-numberToMask", "5" + }); String output = bout.toString(); - assertEquals(output, "My SSN is xxxxx9127\n"); + assertThat(output, containsString("My SSN is xxxxx9127")); } @Test - public void testDeidStringPerformsFpe() throws Exception { - String text = "\"My SSN is 372819127\""; - DeIdentification.main(new String[] { - "-f", text, - "-wrappedKey", wrappedKey, - "-keyName", keyName - }); + public void testDeidReidFpe() throws Exception { + + // Test DeID + String text = "My SSN is 372819127"; + DeIdentification.main( + new String[] { + "-f", + "\"" + text + "\"", + "-wrappedKey", + wrappedKey, + "-keyName", + keyName, + "-commonAlphabet", + "NUMERIC", + "-surrogateType", + "SSN_TOKEN" + }); + String deidOutput = bout.toString(); + assertFalse("Response contains original SSN.", deidOutput.contains("372819127")); + assertTrue(deidOutput.matches("My SSN is SSN_TOKEN\\(9\\):\\d+\n")); + + // Test ReID + bout.flush(); + DeIdentification.main( + new String[] { + "-r", + deidOutput.toString().trim(), + "-wrappedKey", + wrappedKey, + "-keyName", + keyName, + "-commonAlphabet", + "NUMERIC", + "-surrogateType", + "SSN_TOKEN" + }); + String reidOutput = bout.toString(); + assertThat(reidOutput, containsString(text)); + } + + @Test + public void testDeidentifyWithDateShift() throws Exception { + String outputPath = "src/test/resources/results.temp.csv"; + DeIdentification.main( + new String[] { + "-d", + "-inputCsvPath", + "src/test/resources/dates.csv", + "-outputCsvPath", + outputPath, + "-dateFields", + "birth_date,register_date", + "-lowerBoundDays", + "5", + "-upperBoundDays", + "5", + "-contextField", + "name", + "-wrappedKey", + wrappedKey, + "-keyName", + keyName + }); String output = bout.toString(); - assertFalse(output.contains(text)); - assertTrue(Pattern.compile("My SSN is \\w+").matcher(output).find()); + assertThat(output, containsString("Successfully saved date-shift output to: results.temp.csv")); + + // Compare the result against an expected output file + byte[] resultCsv = Files.readAllBytes(Paths.get(outputPath)); + byte[] correctCsv = Files.readAllBytes(Paths.get("src/test/resources/results.correct.csv")); + + assertTrue(Arrays.equals(resultCsv, correctCsv)); } @After diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 5f57d194a8a..60f078dcb26 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -16,28 +16,30 @@ package com.example.dlp; +import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; -import java.io.File; import java.io.PrintStream; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class InspectIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + // CHECKSTYLE ON: AbbreviationAsWordInName + private ByteArrayOutputStream bout; private PrintStream out; // Update to Google Cloud Storage path containing test.txt private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; + private String topicId = "dlp-tests"; + private String subscriptionId = "dlp-test"; // Update to Google Cloud Datastore Kind containing an entity // with phone number and email address properties. @@ -47,7 +49,7 @@ public class InspectIT { public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); - System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH + System.setOut(out); assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); } @@ -55,61 +57,99 @@ public void setUp() { public void testStringInspectionReturnsInfoTypes() throws Exception { String text = "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; - Inspect.main(new String[] {"-s", text}); + Inspect.main(new String[] {"-s", text, "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"}); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + + assertThat(output, containsString("PHONE_NUMBER")); + assertThat(output, containsString("EMAIL_ADDRESS")); } @Test public void testTextFileInspectionReturnsInfoTypes() throws Exception { - ClassLoader classLoader = getClass().getClassLoader(); - File file = new File(classLoader.getResource("test.txt").getFile()); - Inspect.main(new String[] {"-f", file.getAbsolutePath()}); + Inspect.main( + new String[] { + "-f", "src/test/resources/test.txt", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" + }); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + assertThat(output, containsString("PHONE_NUMBER")); + assertThat(output, containsString("EMAIL_ADDRESS")); } - @Ignore // TODO: b/69461298 @Test public void testImageFileInspectionReturnsInfoTypes() throws Exception { - ClassLoader classLoader = getClass().getClassLoader(); - File file = new File(classLoader.getResource("test.png").getFile()); - Inspect.main(new String[] {"-f", file.getAbsolutePath()}); + Inspect.main( + new String[] { + "-f", "src/test/resources/test.png", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" + }); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + assertThat(output, containsString("PHONE_NUMBER")); + assertThat(output, containsString("EMAIL_ADDRESS")); } // Requires that bucket by the specified name exists @Test public void testGcsFileInspectionReturnsInfoTypes() throws Exception { - Inspect.main(new String[] {"-gcs", "-bucketName", bucketName, "-fileName", "test.txt"}); + Inspect.main( + new String[] { + "-gcs", + "-bucketName", + bucketName, + "-topicId", + topicId, + "-subscriptionId", + subscriptionId, + "-fileName", + "test.txt", + "-infoTypes", + "PHONE_NUMBER", + "EMAIL_ADDRESS" + }); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + assertThat(output, containsString("PHONE_NUMBER")); + assertThat(output, containsString("EMAIL_ADDRESS")); } // Requires a Datastore kind containing an entity // with phone number and email address properties. @Test public void testDatastoreInspectionReturnsInfoTypes() throws Exception { - Inspect.main(new String[] {"-ds", "-kind", datastoreKind}); + Inspect.main( + new String[] { + "-ds", + "-kind", + datastoreKind, + "-topicId", + topicId, + "-subscriptionId", + subscriptionId, + "-infoTypes", + "PHONE_NUMBER", + "EMAIL_ADDRESS" + }); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + assertThat(output, containsString("PHONE_NUMBER")); + assertThat(output, containsString("EMAIL_ADDRESS")); } @Test public void testBigqueryInspectionReturnsInfoTypes() throws Exception { - Inspect.main(new String[] { - "-bq", - "-datasetId", "integration_tests_dlp", - "-tableId", "harmful" - }); + Inspect.main( + new String[] { + "-bq", + "-datasetId", + "integration_tests_dlp", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId, + "-tableId", + "harmful", + "-infoTypes", + "PHONE_NUMBER", + "EMAIL_ADDRESS" + }); String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); + assertThat(output, containsString("PHONE_NUMBER")); } @After diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java new file mode 100644 index 00000000000..73ecff9d8f4 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java @@ -0,0 +1,85 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +// CHECKSTYLE OFF: AbbreviationAsWordInName +@RunWith(JUnit4.class) +public class JobsIT { + // CHECKSTYLE ON: AbbreviationAsWordInName + + private ByteArrayOutputStream bout; + private PrintStream out; + + private static final Pattern jobIdPattern = Pattern.compile("projects/.*/dlpJobs/i-\\d+"); + + // Update to Google Cloud Storage path containing test.txt + private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testListJobs() throws Exception { + Jobs.main(new String[] {"-l", "-filter", "state=DONE"}); + String output = bout.toString(); + Matcher matcher = jobIdPattern.matcher(bout.toString()); + assertTrue("List must contain results.", matcher.find()); + } + + @Test + public void testDeleteJobs() throws Exception { + // Get a list of JobIds, and extract one to delete + Jobs.main(new String[] {"-l", "-filter", "state=DONE"}); + String jobList = bout.toString(); + Matcher matcher = jobIdPattern.matcher(jobList); + assertTrue("List must contain results.", matcher.find()); + // Extract just the ID + String jobId = matcher.group(0).split("/")[3]; + bout.reset(); + + // Delete the Job + Jobs.main(new String[] {"-d", "-jobId", jobId}); + String output = bout.toString(); + assertThat(output, containsString("Job deleted successfully.")); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java index 25ba2b68f5d..a4b968221c0 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java @@ -28,9 +28,9 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class MetadataIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; @@ -43,23 +43,20 @@ public void setUp() { assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); } - @Test - public void testRootCategoriesAreRetrieved() throws Exception { - Metadata.main(new String[] {}); - String output = bout.toString(); - assertTrue(output.contains("GOVERNMENT")); - assertTrue(output.contains("HEALTH")); + @After + public void tearDown() { + System.setOut(null); + bout.reset(); } @Test - public void testInfoTypesAreRetrieved() throws Exception { - Metadata.main(new String[] {"-category", "GOVERNMENT"}); + public void testListInfoTypes() throws Exception { + Metadata.main( + new String[] { + "-language", "en-US", + "-filter", "supported_by=INSPECT" + }); String output = bout.toString(); assertTrue(output.contains("Name") && output.contains("Display name")); } - - @After - public void tearDown() { - System.setOut(null); - } } diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java index 1fa9d7b36d6..d62726ea2db 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java @@ -16,8 +16,9 @@ package com.example.dlp; +import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; import java.io.PrintStream; @@ -28,9 +29,10 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class QuickStartIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + + // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; @@ -46,7 +48,8 @@ public void setUp() { public void testQuickStart() throws Exception { QuickStart.main(new String[] {}); String output = bout.toString(); - assertTrue(output.contains("US_MALE_NAME")); + + assertThat(output, containsString("PERSON_NAME")); } @After diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java index 798c11de258..5708fae6211 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java @@ -16,24 +16,24 @@ package com.example.dlp; -import static junit.framework.TestCase.assertFalse; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; -import java.io.File; import java.io.PrintStream; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class RedactIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + + // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; @@ -46,36 +46,25 @@ public void setUp() { } @Test - public void testInfoTypesInStringAreReplaced() throws Exception { - String text = - "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; - Redact.main(new String[] {"-s", text, "-r", "_REDACTED_"}); - String output = bout.toString(); - assertTrue(output.contains("My phone number is _REDACTED_ and my email address is _REDACTED_")); - } - - @Ignore // TODO: b/69461298 - @Test - public void testInfoTypesInImageAreReplaced() throws Exception { - ClassLoader classLoader = getClass().getClassLoader(); - // confirm that current data contains info types - File file = new File(classLoader.getResource("test.png").getFile()); - Inspect.main(new String[] {"-f", file.getAbsolutePath()}); - String output = bout.toString(); - assertTrue(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); - bout.reset(); - - String outputFilePath = "output.png"; + public void testRedactImage() throws Exception { + // InspectIT Tests verify original has PII present + String outputFilePath = "src/test/resources/output.png"; + // Restrict phone number, but not email Redact.main( new String[] { - "-f", file.getAbsolutePath(), "-infoTypes", "PHONE_NUMBER", "-o", outputFilePath + "-f", "src/test/resources/test.png", + "-infoTypes", "PHONE_NUMBER", + "-o", outputFilePath }); - Inspect.main(new String[] {"-f", outputFilePath}); - output = bout.toString(); - assertFalse(output.contains("PHONE_NUMBER")); - assertTrue(output.contains("EMAIL_ADDRESS")); + bout.reset(); + + // Verify that phone_number is missing but email is present + Inspect.main( + new String[] {"-f", outputFilePath, "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"}); + String output = bout.toString(); + assertThat(output, not(containsString("PHONE_NUMBER"))); + assertThat(output, containsString("EMAIL_ADDRESS")); } @After diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java index 58a1bbb22a2..0dc18a87b47 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java @@ -16,7 +16,9 @@ package com.example.dlp; +import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutputStream; @@ -29,17 +31,21 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -//CHECKSTYLE OFF: AbbreviationAsWordInName +// CHECKSTYLE OFF: AbbreviationAsWordInName public class RiskAnalysisIT { - //CHECKSTYLE ON: AbbreviationAsWordInName + + // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; private PrintStream out; + private String topicId = "dlp-tests"; + private String subscriptionId = "dlp-test"; + @Before public void setUp() { bout = new ByteArrayOutputStream(); out = new PrintStream(bout); - System.setOut(out); // TODO(b/64541432) DLP currently doesn't support GOOGLE DEFAULT AUTH + System.setOut(out); assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); @@ -47,40 +53,63 @@ public void setUp() { @Test public void testNumericalStats() throws Exception { - RiskAnalysis.main(new String[] { - "-n", - "-datasetId", "integration_tests_dlp", - "-tableId", "harmful", - "-columnName", "Age" - }); + RiskAnalysis.main( + new String[] { + "-n", + "-datasetId", + "integration_tests_dlp", + "-tableId", + "harmful", + "-columnName", + "Age", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId + }); String output = bout.toString(); - assertTrue(Pattern.compile( - "Value at 0% quantile: integer_value: \\d{2}").matcher(output).find()); - assertTrue(Pattern.compile( - "Value at \\d{2}% quantile: integer_value: \\d{2}").matcher(output).find()); + assertThat(output, containsString("Value at ")); } @Test public void testCategoricalStats() throws Exception { - RiskAnalysis.main(new String[] { - "-c", - "-datasetId", "integration_tests_dlp", - "-tableId", "harmful", - "-columnName", "Mystery" - }); + RiskAnalysis.main( + new String[] { + "-c", + "-datasetId", + "integration_tests_dlp", + "-tableId", + "harmful", + "-columnName", + "Mystery", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId + }); String output = bout.toString(); - assertTrue(Pattern.compile( - "Most common value occurs \\d time\\(s\\)").matcher(output).find()); + + assertTrue(Pattern.compile("Most common value occurs \\d time").matcher(output).find()); + assertTrue(Pattern.compile("Least common value occurs \\d time").matcher(output).find()); } @Test public void testKAnonymity() throws Exception { - RiskAnalysis.main(new String[] { - "-k", - "-datasetId", "integration_tests_dlp", - "-tableId", "harmful", - "-quasiIdColumnNames", "Age", "Mystery" - }); + RiskAnalysis.main( + new String[] { + "-a", + "-datasetId", + "integration_tests_dlp", + "-tableId", + "harmful", + "-quasiIdColumnNames", + "Age", + "Mystery", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId + }); String output = bout.toString(); assertTrue(Pattern.compile("Bucket size range: \\[\\d, \\d\\]").matcher(output).find()); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); @@ -89,19 +118,58 @@ public void testKAnonymity() throws Exception { @Test public void testLDiversity() throws Exception { - RiskAnalysis.main(new String[] { - "-l", - "-datasetId", "integration_tests_dlp", - "-tableId", "harmful", - "-sensitiveAttribute", "Name", - "-quasiIdColumnNames", "Age", "Mystery" - }); + RiskAnalysis.main( + new String[] { + "-l", + "-datasetId", + "integration_tests_dlp", + "-tableId", + "harmful", + "-sensitiveAttribute", + "Name", + "-quasiIdColumnNames", + "Age", + "Mystery", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId + }); String output = bout.toString(); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); assertTrue(output.contains("Class size: 1")); assertTrue(output.contains("Sensitive value string_value: \"James\"")); } + @Test + public void testKMap() throws Exception { + RiskAnalysis.main( + new String[] { + "-m", + "-datasetId", + "integration_tests_dlp", + "-tableId", + "harmful", + "-topicId", + topicId, + "-subscriptionId", + subscriptionId, + "-regionCode", + "US", + "-quasiIdColumnNames", + "Age", + "Gender", + "-infoTypes", + "AGE", + "GENDER" + }); + String output = bout.toString(); + + assertTrue(Pattern.compile("Anonymity range: \\[\\d, \\d]").matcher(output).find()); + assertTrue(Pattern.compile("Size: \\d").matcher(output).find()); + assertTrue(Pattern.compile("Values: \\{\\d{2}, \"Female\"\\}").matcher(output).find()); + } + @After public void tearDown() { System.setOut(null); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java new file mode 100644 index 00000000000..11c3525d12d --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java @@ -0,0 +1,93 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +// CHECKSTYLE OFF: AbbreviationAsWordInName +public class TemplatesIT { + // CHECKSTYLE ON: AbbreviationAsWordInName + + private ByteArrayOutputStream bout; + private PrintStream out; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateInspectTemplate() throws Exception { + Templates.main( + new String[] { + "-c", + "-displayName", + String.format("test-name-%s", UUID.randomUUID()), + "-templateId", + String.format("template%s", UUID.randomUUID()), + "-description", + String.format("description-%s", UUID.randomUUID()) + }); + String output = bout.toString(); + assertThat(output, containsString("Template created: ")); + } + + @Test + public void testListInspectemplate() throws Exception { + Templates.main(new String[] {"-l"}); + String output = bout.toString(); + assertThat(output, containsString("Template name:")); + } + + @Test + public void testDeleteInspectTemplate() throws Exception { + // Extract a Template ID + Templates.main(new String[] {"-l"}); + String output = bout.toString(); + Matcher templateIds = Pattern.compile("template(\\w|\\-)+").matcher(output); + assertTrue(templateIds.find()); + String templateId = templateIds.group(0); + bout.reset(); + Templates.main(new String[] {"-d", "-templateId", templateId}); + output = bout.toString(); + assertThat(output, containsString("Deleted template:")); + } +} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java new file mode 100644 index 00000000000..4a9b07c4063 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java @@ -0,0 +1,106 @@ +/* + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.dlp; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.UUID; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +// CHECKSTYLE OFF: AbbreviationAsWordInName +public class TriggersIT { + + //CHECKSTYLE ON: AbbreviationAsWordInName + + private ByteArrayOutputStream bout; + private PrintStream out; + + private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; + private String topicId = "dlp-tests"; + private String subscriptionId = "dlp-test"; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + System.setOut(out); + assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateTrigger() throws Exception { + Triggers.main( + new String[] { + "-c", + "-displayName", + String.format("trigger-name-%s", UUID.randomUUID()), + "-triggerId", + String.format("trigger%s", UUID.randomUUID()), + "-description", + String.format("description-%s", UUID.randomUUID()), + "-bucketName", + bucketName, + "-fileName", + "test.txt", + "-scanPeriod", + "1" + }); + String output = bout.toString(); + assertThat(output, containsString("Created Trigger:")); + } + + @Test + public void testListTrigger() throws Exception { + Triggers.main(new String[] {"-l"}); + String output = bout.toString(); + assertThat(output, containsString("Trigger:")); + } + + @Test + public void testDeleteTrigger() throws Exception { + Triggers.main(new String[] {"-l"}); + String output = bout.toString(); + Matcher templateIds = Pattern.compile("(?<=jobTriggers/)[0-9]+").matcher(output); + assertTrue(templateIds.find()); + String triggerId = templateIds.group(0); + bout.reset(); + Triggers.main( + new String[] { + "-d", "-triggerId", triggerId, + }); + output = bout.toString(); + assertThat(output, containsString("Trigger deleted:")); + } +} diff --git a/dlp/snippets/snippets/src/test/resources/dates.csv b/dlp/snippets/snippets/src/test/resources/dates.csv new file mode 100644 index 00000000000..290a85dec68 --- /dev/null +++ b/dlp/snippets/snippets/src/test/resources/dates.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,01/01/1970,4532908762519852,07/21/1996 +James,03/06/1988,4301261899725540,04/09/2001 +Dan,08/14/1945,4620761856015295,11/15/2011 +Laura,11/03/1992,4564981067258901,01/04/2017 diff --git a/dlp/snippets/snippets/src/test/resources/results.correct.csv b/dlp/snippets/snippets/src/test/resources/results.correct.csv new file mode 100644 index 00000000000..5b078fe825a --- /dev/null +++ b/dlp/snippets/snippets/src/test/resources/results.correct.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,1970-01-06,4532908762519852,1996-07-26 +James,1988-03-11,4301261899725540,2001-04-14 +Dan,1945-08-19,4620761856015295,2011-11-20 +Laura,1992-11-08,4564981067258901,2017-01-09 From e6c7e8c6714667dd99b0e42eeeac28847228932f Mon Sep 17 00:00:00 2001 From: realjordanna <32629229+realjordanna@users.noreply.github.com> Date: Fri, 25 May 2018 10:05:45 -0700 Subject: [PATCH 042/406] samples: Fix documentation for deIdentifyWithMask (#1110) Fix the end tag deIdentifyWithMask to match the start tag which is dlp_deidentify_masking. --- .../src/main/java/com/example/dlp/DeIdentification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index 8ffa46bc0e9..cd6932454af 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -132,7 +132,7 @@ private static void deIdentifyWithMask( System.out.println("Error in deidentifyWithMask: " + e.getMessage()); } } - // [END dlp_deidentify_mask] + // [END dlp_deidentify_masking] // [START dlp_deidentify_fpe] /** From 680f2a44907547462703505f01ff45181e2fa7cf Mon Sep 17 00:00:00 2001 From: Mike DaCosta Date: Thu, 21 Jun 2018 11:36:42 -0700 Subject: [PATCH 043/406] samples: DLP: Add autoPopulateTimespan option for creating job triggers. (#1134) --- .../src/main/java/com/example/dlp/Triggers.java | 17 ++++++++++++++++- .../test/java/com/example/dlp/TriggersIT.java | 7 ++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java index c6e180d58dc..86601734895 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java @@ -31,6 +31,7 @@ import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; +import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; import com.google.protobuf.Duration; import java.util.ArrayList; import java.util.List; @@ -52,6 +53,7 @@ public class Triggers { * @param triggerId (Optional) name of the trigger to be created * @param displayName (Optional) display name for the trigger to be created * @param description (Optional) description for the trigger to be created + * @param autoPopulateTimespan If true, limits scans to new content only. * @param scanPeriod How often to wait between scans, in days (minimum = 1 day) * @param infoTypes infoTypes of information to match eg. InfoType.PHONE_NUMBER, * InfoType.EMAIL_ADDRESS @@ -65,6 +67,7 @@ private static void createTrigger( String description, String bucketName, String fileName, + boolean autoPopulateTimespan, int scanPeriod, List infoTypes, Likelihood minLikelihood, @@ -82,8 +85,13 @@ private static void createTrigger( CloudStorageOptions.FileSet.newBuilder() .setUrl("gs://" + bucketName + "/" + fileName)) .build(); + + TimespanConfig timespanConfig = TimespanConfig.newBuilder() + .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan).build(); + StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions) + .setTimespanConfig(timespanConfig).build(); InspectConfig.FindingLimits findingLimits = InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); @@ -216,6 +224,10 @@ public static void main(String[] args) throws Exception { Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); commandLineOptions.addOption(gcsFileNameOption); + Option autoPopulateTimespanOption = Option.builder("autoPopulateTimespan").required(false) + .build(); + commandLineOptions.addOption(autoPopulateTimespanOption); + Option minLikelihoodOption = Option.builder("minLikelihood").hasArg(true).required(false).build(); @@ -268,6 +280,8 @@ public static void main(String[] args) throws Exception { String description = cmd.getOptionValue(descriptionOption.getOpt(), ""); String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); + boolean autoPopulateTimespan = Boolean + .valueOf(cmd.getOptionValue(autoPopulateTimespanOption.getOpt())); int scanPeriod = Integer.valueOf(cmd.getOptionValue(scanPeriodOption.getOpt())); List infoTypesList = new ArrayList<>(); if (cmd.hasOption(infoTypesOption.getOpt())) { @@ -283,6 +297,7 @@ public static void main(String[] args) throws Exception { description, bucketName, fileName, + autoPopulateTimespan, scanPeriod, infoTypesList, minLikelihood, diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java index 4a9b07c4063..b559ce7a738 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java @@ -39,17 +39,13 @@ public class TriggersIT { //CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; - private PrintStream out; private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; - private String topicId = "dlp-tests"; - private String subscriptionId = "dlp-test"; @Before public void setUp() { bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); + System.setOut(new PrintStream(bout)); assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); } @@ -74,6 +70,7 @@ public void testCreateTrigger() throws Exception { bucketName, "-fileName", "test.txt", + "-autoPopulateTimespan", "-scanPeriod", "1" }); From dd5de07e34be1b1226b49599877934d7e4287190 Mon Sep 17 00:00:00 2001 From: mwdaub Date: Wed, 27 Jun 2018 13:10:08 -0700 Subject: [PATCH 044/406] samples: Add DLP code samples for custom info types (#1121) * Add custom info types to code samples Include samples of using custom dictionaries and custom regexes. * Add missing imports * Fix build errors * Add tests for custom info types * Fix bad regexes. * Fix bad regexes, part 2. * Update README.md Add custom info type flags and fix existing examples so they work with the V2 API. * Fix import order * Fix line length violations * Fix line length formatting violations * Fix broken character mask test DLP now requires the client to specify info types to search for when using DeID with wildcard info types. * Add SSN info type to tests * Add info types to DeID with FPE test --- .../com/example/dlp/DeIdentification.java | 38 ++++++++- .../main/java/com/example/dlp/Inspect.java | 81 ++++++++++++++++++- .../com/example/dlp/DeIdentificationIT.java | 3 + .../test/java/com/example/dlp/InspectIT.java | 37 ++++++++- 4 files changed, 153 insertions(+), 6 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index cd6932454af..7415cc79593 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -57,6 +57,7 @@ import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.cli.CommandLine; @@ -81,7 +82,11 @@ public class DeIdentification { * @param projectId ID of Google Cloud project to run the API under. */ private static void deIdentifyWithMask( - String string, Character maskingCharacter, int numberToMask, String projectId) { + String string, + List infoTypes, + Character maskingCharacter, + int numberToMask, + String projectId) { // instantiate a client try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { @@ -108,6 +113,11 @@ private static void deIdentifyWithMask( .addTransformations(infoTypeTransformationObject) .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + DeidentifyConfig deidentifyConfig = DeidentifyConfig.newBuilder() .setInfoTypeTransformations(infoTypeTransformationArray) @@ -117,6 +127,7 @@ private static void deIdentifyWithMask( DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() .setParent(ProjectName.of(projectId).toString()) + .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) .setItem(contentItem) .build(); @@ -147,6 +158,7 @@ private static void deIdentifyWithMask( */ private static void deIdentifyWithFpe( String string, + List infoTypes, FfxCommonNativeAlphabet alphabet, String keyName, String wrappedKey, @@ -188,6 +200,11 @@ private static void deIdentifyWithFpe( .addTransformations(infoTypeTransformationObject) .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + // Create the deidentification request object DeidentifyConfig deidentifyConfig = DeidentifyConfig.newBuilder() @@ -197,6 +214,7 @@ private static void deIdentifyWithFpe( DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() .setParent(ProjectName.of(projectId).toString()) + .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) .setItem(contentItem) .build(); @@ -513,6 +531,10 @@ public static void main(String[] args) throws Exception { Options commandLineOptions = new Options(); commandLineOptions.addOptionGroup(optionsGroup); + Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); + infoTypesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(infoTypesOption); + Option maskingCharacterOption = Option.builder("maskingCharacter").hasArg(true).required(false).build(); commandLineOptions.addOption(maskingCharacterOption); @@ -575,12 +597,21 @@ public static void main(String[] args) throws Exception { String projectId = cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + List infoTypesList = Collections.emptyList(); + if (cmd.hasOption(infoTypesOption.getOpt())) { + infoTypesList = new ArrayList<>(); + String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); + for (String infoType : infoTypes) { + infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); + } + } + if (cmd.hasOption("m")) { // deidentification with character masking int numberToMask = Integer.parseInt(cmd.getOptionValue(numberToMaskOption.getOpt(), "0")); char maskingCharacter = cmd.getOptionValue(maskingCharacterOption.getOpt(), "*").charAt(0); String val = cmd.getOptionValue(deidentifyMaskingOption.getOpt()); - deIdentifyWithMask(val, maskingCharacter, numberToMask, projectId); + deIdentifyWithMask(val, infoTypesList, maskingCharacter, numberToMask, projectId); } else if (cmd.hasOption("f")) { // deidentification with FPE String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); @@ -591,7 +622,8 @@ public static void main(String[] args) throws Exception { FfxCommonNativeAlphabet.valueOf( cmd.getOptionValue( alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); - deIdentifyWithFpe(val, alphabet, keyName, wrappedKey, projectId, surrogateType); + deIdentifyWithFpe( + val, infoTypesList, alphabet, keyName, wrappedKey, projectId, surrogateType); } else if (cmd.hasOption("d")) { //deidentify with date shift String inputCsv = cmd.getOptionValue(inputCsvPathOption.getOpt()); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index d4adc6d33ba..8defeb657c7 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -27,6 +27,10 @@ import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.ContentItem; import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; import com.google.privacy.dlp.v2.DatastoreOptions; import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.Finding; @@ -52,6 +56,7 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; @@ -82,6 +87,7 @@ private static void inspectString( Likelihood minLikelihood, int maxFindings, List infoTypes, + List customInfoTypes, boolean includeQuote, String projectId) { // instantiate a client @@ -91,6 +97,7 @@ private static void inspectString( InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) + .addAllCustomInfoTypes(customInfoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) .setIncludeQuote(includeQuote) @@ -146,6 +153,7 @@ private static void inspectFile( Likelihood minLikelihood, int maxFindings, List infoTypes, + List customInfoTypes, boolean includeQuote, String projectId) { // Instantiates a client @@ -189,6 +197,7 @@ private static void inspectFile( InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) + .addAllCustomInfoTypes(customInfoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) .setIncludeQuote(includeQuote) @@ -242,6 +251,7 @@ private static void inspectGcsFile( String fileName, Likelihood minLikelihood, List infoTypes, + List customInfoTypes, int maxFindings, String topicId, String subscriptionId, @@ -266,6 +276,7 @@ private static void inspectGcsFile( InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) + .addAllCustomInfoTypes(customInfoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) .build(); @@ -363,6 +374,7 @@ private static void inspectDatastore( String kind, Likelihood minLikelihood, List infoTypes, + List customInfoTypes, int maxFindings, String topicId, String subscriptionId) { @@ -388,6 +400,7 @@ private static void inspectDatastore( InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) + .addAllCustomInfoTypes(customInfoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) .build(); @@ -486,6 +499,7 @@ private static void inspectBigquery( String tableId, Likelihood minLikelihood, List infoTypes, + List customInfoTypes, int maxFindings, String topicId, String subscriptionId) { @@ -511,6 +525,7 @@ private static void inspectBigquery( InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) + .addAllCustomInfoTypes(customInfoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) .build(); @@ -629,6 +644,16 @@ public static void main(String[] args) throws Exception { infoTypesOption.setArgs(Option.UNLIMITED_VALUES); commandLineOptions.addOption(infoTypesOption); + Option customDictionariesOption = + Option.builder("customDictionaries").hasArg(true).required(false).build(); + customDictionariesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(customDictionariesOption); + + Option customRegexesOption = + Option.builder("customRegexes").hasArg(true).required(false).build(); + customRegexesOption.setArgs(Option.UNLIMITED_VALUES); + commandLineOptions.addOption(customRegexesOption); + Option includeQuoteOption = Option.builder("includeQuote").hasArg(true).required(false).build(); commandLineOptions.addOption(includeQuoteOption); @@ -695,13 +720,62 @@ public static void main(String[] args) throws Exception { infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); } } + + List customInfoTypesList = new ArrayList<>(); + if (cmd.hasOption(customDictionariesOption.getOpt())) { + String[] dictionaryStrings = cmd.getOptionValues(customDictionariesOption.getOpt()); + for (int i = 0; i < dictionaryStrings.length; i++) { + String[] dictionaryWords = dictionaryStrings[i].split(","); + CustomInfoType customInfoType = + CustomInfoType + .newBuilder() + .setInfoType( + InfoType.newBuilder().setName(String.format("CUSTOM_DICTIONARY_%s", i))) + .setDictionary( + Dictionary + .newBuilder() + .setWordList( + WordList + .newBuilder() + .addAllWords(Arrays.asList(dictionaryWords)))) + .build(); + customInfoTypesList.add(customInfoType); + } + } + if (cmd.hasOption(customRegexesOption.getOpt())) { + String[] patterns = cmd.getOptionValues(customRegexesOption.getOpt()); + for (int i = 0; i < patterns.length; i++) { + CustomInfoType customInfoType = + CustomInfoType + .newBuilder() + .setInfoType(InfoType.newBuilder().setName(String.format("CUSTOM_REGEX_%s", i))) + .setRegex(Regex.newBuilder().setPattern(patterns[i])) + .build(); + customInfoTypesList.add(customInfoType); + } + } + // string inspection if (cmd.hasOption("s")) { String val = cmd.getOptionValue(stringOption.getOpt()); - inspectString(val, minLikelihood, maxFindings, infoTypesList, includeQuote, projectId); + inspectString( + val, + minLikelihood, + maxFindings, + infoTypesList, + customInfoTypesList, + includeQuote, + projectId); } else if (cmd.hasOption("f")) { String filePath = cmd.getOptionValue(fileOption.getOpt()); - inspectFile(filePath, minLikelihood, maxFindings, infoTypesList, includeQuote, projectId); + inspectFile( + filePath, + minLikelihood, + maxFindings, + infoTypesList, + customInfoTypesList, + includeQuote, + projectId); // gcs file inspection } else if (cmd.hasOption("gcs")) { String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); @@ -711,6 +785,7 @@ public static void main(String[] args) throws Exception { fileName, minLikelihood, infoTypesList, + customInfoTypesList, maxFindings, topicId, subscriptionId, @@ -726,6 +801,7 @@ public static void main(String[] args) throws Exception { kind, minLikelihood, infoTypesList, + customInfoTypesList, maxFindings, topicId, subscriptionId); @@ -739,6 +815,7 @@ public static void main(String[] args) throws Exception { tableId, minLikelihood, infoTypesList, + customInfoTypesList, maxFindings, topicId, subscriptionId); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java index ec796c60bbb..9ec1d44ef6b 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java @@ -63,6 +63,7 @@ public void testDeidStringMasksCharacters() throws Exception { DeIdentification.main( new String[] { "-m", text, + "-infoTypes", "US_SOCIAL_SECURITY_NUMBER", "-maskingCharacter", "x", "-numberToMask", "5" }); @@ -79,6 +80,8 @@ public void testDeidReidFpe() throws Exception { new String[] { "-f", "\"" + text + "\"", + "-infoTypes", + "US_SOCIAL_SECURITY_NUMBER", "-wrappedKey", wrappedKey, "-keyName", diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 60f078dcb26..17814cfc395 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -64,17 +64,52 @@ public void testStringInspectionReturnsInfoTypes() throws Exception { assertThat(output, containsString("EMAIL_ADDRESS")); } + @Test + public void testStringInspectionReturnsCustomInfoTypes() throws Exception { + String text = + "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; + Inspect.main( + new String[] { + "-s", + text, + "-customDictionaries", + "gary@somedomain.com", + "-customRegexes", + "\\(\\d{3}\\) \\d{3}-\\d{4}" + }); + String output = bout.toString(); + + assertThat(output, containsString("CUSTOM_DICTIONARY_0")); + assertThat(output, containsString("CUSTOM_REGEX_0")); + } + @Test public void testTextFileInspectionReturnsInfoTypes() throws Exception { Inspect.main( new String[] { - "-f", "src/test/resources/test.txt", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" + "-f", "src/test/resources/test.txt", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" }); String output = bout.toString(); assertThat(output, containsString("PHONE_NUMBER")); assertThat(output, containsString("EMAIL_ADDRESS")); } + @Test + public void testTextFileInspectionReturnsCustomInfoTypes() throws Exception { + Inspect.main( + new String[] { + "-f", + "src/test/resources/test.txt", + "-customDictionaries", + "gary@somedomain.com", + "-customRegexes", + "\\(\\d{3}\\) \\d{3}-\\d{4}" + }); + String output = bout.toString(); + assertThat(output, containsString("CUSTOM_DICTIONARY_0")); + assertThat(output, containsString("CUSTOM_REGEX_0")); + } + @Test public void testImageFileInspectionReturnsInfoTypes() throws Exception { Inspect.main( From 5bd1bf683edca9f93b82a87c0bb39dd2b70d2086 Mon Sep 17 00:00:00 2001 From: jmorrise Date: Thu, 10 Jan 2019 13:39:26 -0800 Subject: [PATCH 045/406] samples: add replace with info type examples, and update README (#1299) --- .../com/example/dlp/DeIdentification.java | 76 ++++++++++++++++++- .../com/example/dlp/DeIdentificationIT.java | 12 +++ 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index 7415cc79593..ab6c8683a72 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -42,6 +42,7 @@ import com.google.privacy.dlp.v2.RecordTransformations; import com.google.privacy.dlp.v2.ReidentifyContentRequest; import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; import com.google.privacy.dlp.v2.Table; import com.google.privacy.dlp.v2.Value; import com.google.protobuf.ByteString; @@ -71,6 +72,71 @@ public class DeIdentification { + // [START dlp_deidentify_replace_with_info_type] + /** + * Deidentify a string by replacing sensitive information with its info type using the DLP API. + * + * @param string The string to deidentify. + * @param projectId ID of Google Cloud project to run the API under. + */ + private static void deIdentifyReplaceWithInfoType( + String string, + List infoTypes, + String projectId) { + + // instantiate a client + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); + + // Create the deidentification transformation configuration + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(ReplaceWithInfoTypeConfig.getDefaultInstance()) + .build(); + + InfoTypeTransformation infoTypeTransformationObject = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + + InfoTypeTransformations infoTypeTransformationArray = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformationObject) + .build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(infoTypeTransformationArray) + .build(); + + // Create the deidentification request object + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .setItem(contentItem) + .build(); + + // Execute the deidentification request + DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); + + // Print the redacted input value + // e.g. "My SSN is 123456789" --> "My SSN is [US_SOCIAL_SECURITY_NUMBER]" + String result = response.getItem().getValue(); + System.out.println(result); + } catch (Exception e) { + System.out.println("Error in deIdentifyReplaceWithInfoType: " + e.getMessage()); + } + } + // [END dlp_deidentify_replace_with_info_type] + // [START dlp_deidentify_masking] /** * Deidentify a string by masking sensitive information with a character using the DLP API. @@ -512,6 +578,10 @@ public static void main(String[] args) throws Exception { OptionGroup optionsGroup = new OptionGroup(); optionsGroup.setRequired(true); + Option deidentifyReplaceWithInfoTypeOption = + new Option("it", "info_type_replace", true, "Deidentify by replacing with info type."); + optionsGroup.addOption(deidentifyReplaceWithInfoTypeOption); + Option deidentifyMaskingOption = new Option("m", "mask", true, "Deidentify with character masking."); optionsGroup.addOption(deidentifyMaskingOption); @@ -606,7 +676,11 @@ public static void main(String[] args) throws Exception { } } - if (cmd.hasOption("m")) { + if (cmd.hasOption("it")) { + // replace with info type + String val = cmd.getOptionValue(deidentifyReplaceWithInfoTypeOption.getOpt()); + deIdentifyReplaceWithInfoType(val, infoTypesList, projectId); + } else if (cmd.hasOption("m")) { // deidentification with character masking int numberToMask = Integer.parseInt(cmd.getOptionValue(numberToMaskOption.getOpt(), "0")); char maskingCharacter = cmd.getOptionValue(maskingCharacterOption.getOpt(), "*").charAt(0); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java index 9ec1d44ef6b..26965022789 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java @@ -57,6 +57,18 @@ public void setUp() { assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); } + @Test + public void testDeidReplaceWithInfoType() throws Exception { + String text = "\"My SSN is 372819127\""; + DeIdentification.main( + new String[] { + "-it", text, + "-infoTypes", "US_SOCIAL_SECURITY_NUMBER" + }); + String output = bout.toString(); + assertThat(output, containsString("My SSN is [US_SOCIAL_SECURITY_NUMBER]")); + } + @Test public void testDeidStringMasksCharacters() throws Exception { String text = "\"My SSN is 372819127\""; From 709d000d3c456a1a7f7a7ad3caf8e48e3d5167a4 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:27:21 -0800 Subject: [PATCH 046/406] samples: Update DLP snippet as canonical for new sample format. (#1232) * Update DLP snippet with proposal for new sample format. * Fix InspectFile region tag. * Fixed package structure and InspectString test. * Reword comments. * Fix unintentional toString. * Seperate API call from response processing. * Seperate ByteType into two different samples. * Remove previous tests. * Updated Redact sample to new format. * Clean up comments. * Bump license year. * Fixed redact test. * Remove old redact snippet and move region tags. * Remove region tag. --- .../main/java/com/example/dlp/Inspect.java | 182 +---------------- .../src/main/java/com/example/dlp/Redact.java | 189 ------------------ .../main/java/com/example/dlp/Templates.java | 2 +- .../java/dlp/snippets/InspectImageFile.java | 94 +++++++++ .../main/java/dlp/snippets/InspectString.java | 90 +++++++++ .../java/dlp/snippets/InspectTextFile.java | 94 +++++++++ .../java/dlp/snippets/RedactImageFile.java | 88 ++++++++ .../test/java/com/example/dlp/InspectIT.java | 68 ------- .../test/java/com/example/dlp/RedactIT.java | 75 ------- .../test/java/dlp/snippets/InspectTests.java | 91 +++++++++ .../test/java/dlp/snippets/RedactTests.java | 70 +++++++ .../snippets/src/test/resources/test.png | Bin 21438 -> 5109 bytes .../snippets/src/test/resources/test.txt | 2 +- 13 files changed, 530 insertions(+), 515 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java index 8defeb657c7..7c1ab137178 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java @@ -72,165 +72,6 @@ public class Inspect { - /** - * [START dlp_inspect_string] Inspect a text for given InfoTypes - * - * @param string String to instpect - * @param minLikelihood The minimum likelihood required before returning a match - * @param maxFindings The maximum number of findings to report (0 = server maximum) - * @param infoTypes The infoTypes of information to match - * @param includeQuote Whether to include the matching string - * @param projectId Google Cloud project ID - */ - private static void inspectString( - String string, - Likelihood minLikelihood, - int maxFindings, - List infoTypes, - List customInfoTypes, - boolean includeQuote, - String projectId) { - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .addAllCustomInfoTypes(customInfoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .setIncludeQuote(includeQuote) - .build(); - - ByteContentItem byteContentItem = - ByteContentItem.newBuilder() - .setType(ByteContentItem.BytesType.TEXT_UTF8) - .setData(ByteString.copyFromUtf8(string)) - .build(); - - ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); - - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectConfig(inspectConfig) - .setItem(contentItem) - .build(); - InspectContentResponse response = dlpServiceClient.inspectContent(request); - - if (response.getResult().getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : response.getResult().getFindingsList()) { - if (includeQuote) { - System.out.print("\tQuote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); - } - } else { - System.out.println("No findings."); - } - } catch (Exception e) { - System.out.println("Error in inspectString: " + e.getMessage()); - } - } - // [END dlp_inspect_string] - - // [START dlp_inspect_file] - /** - * Inspect a local file - * - * @param filePath The path to a local file to inspect. Can be a text, JPG, or PNG file. - * @param minLikelihood The minimum likelihood required before returning a match - * @param maxFindings The maximum number of findings to report (0 = server maximum) - * @param infoTypes The infoTypes of information to match - * @param includeQuote Whether to include the matching string - * @param projectId Google Cloud project ID - */ - private static void inspectFile( - String filePath, - Likelihood minLikelihood, - int maxFindings, - List infoTypes, - List customInfoTypes, - boolean includeQuote, - String projectId) { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // detect file mime type, default to application/octet-stream - String mimeType = URLConnection.guessContentTypeFromName(filePath); - if (mimeType == null) { - mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); - } - - ByteContentItem.BytesType bytesType; - switch (mimeType) { - case "image/jpeg": - bytesType = ByteContentItem.BytesType.IMAGE_JPEG; - break; - case "image/bmp": - bytesType = ByteContentItem.BytesType.IMAGE_BMP; - break; - case "image/png": - bytesType = ByteContentItem.BytesType.IMAGE_PNG; - break; - case "image/svg": - bytesType = ByteContentItem.BytesType.IMAGE_SVG; - break; - default: - bytesType = ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED; - break; - } - - byte[] data = Files.readAllBytes(Paths.get(filePath)); - ByteContentItem byteContentItem = - ByteContentItem.newBuilder() - .setType(bytesType) - .setData(ByteString.copyFrom(data)) - .build(); - ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); - - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .addAllCustomInfoTypes(customInfoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .setIncludeQuote(includeQuote) - .build(); - - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectConfig(inspectConfig) - .setItem(contentItem) - .build(); - - InspectContentResponse response = dlpServiceClient.inspectContent(request); - - InspectResult result = response.getResult(); - if (result.getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : result.getFindingsList()) { - if (includeQuote) { - System.out.print("\tQuote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); - } - } else { - System.out.println("No findings."); - } - } catch (Exception e) { - System.out.println("Error in inspectFile: " + e.getMessage()); - } - } - // [END dlp_inspect_file] - // [START dlp_inspect_gcs] /** * Inspect GCS file for Info types and wait on job completion using Google Cloud Pub/Sub @@ -756,28 +597,7 @@ public static void main(String[] args) throws Exception { } // string inspection - if (cmd.hasOption("s")) { - String val = cmd.getOptionValue(stringOption.getOpt()); - inspectString( - val, - minLikelihood, - maxFindings, - infoTypesList, - customInfoTypesList, - includeQuote, - projectId); - } else if (cmd.hasOption("f")) { - String filePath = cmd.getOptionValue(fileOption.getOpt()); - inspectFile( - filePath, - minLikelihood, - maxFindings, - infoTypesList, - customInfoTypesList, - includeQuote, - projectId); - // gcs file inspection - } else if (cmd.hasOption("gcs")) { + if (cmd.hasOption("gcs")) { String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); inspectGcsFile( diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java deleted file mode 100644 index 1ffd49fc90c..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.ServiceOptions; -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.ByteContentItem; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.protobuf.ByteString; -import java.io.FileOutputStream; -import java.net.URLConnection; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; -import javax.activation.MimetypesFileTypeMap; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Redact { - - // [START dlp_redact_image] - /* - * Redact sensitive data from an image using the Data Loss Prevention API. - * - * @param filePath The path to a local file to inspect. Can be a JPG or PNG image file. - * @param minLikelihood The minimum likelihood required before redacting a match. - * @param infoTypes The infoTypes of information to redact. - * @param outputPath The local path to save the resulting image to. - * @param projectId The project ID to run the API call under. - */ - private static void redactImage( - String filePath, - Likelihood minLikelihood, - List infoTypes, - String outputPath, - String projectId) - throws Exception { - - // Instantiate the DLP client - try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - String mimeType = URLConnection.guessContentTypeFromName(filePath); - if (mimeType == null) { - mimeType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(filePath); - } - - ByteContentItem.BytesType bytesType; - switch (mimeType) { - case "image/jpeg": - bytesType = ByteContentItem.BytesType.IMAGE_JPEG; - break; - case "image/bmp": - bytesType = ByteContentItem.BytesType.IMAGE_BMP; - break; - case "image/png": - bytesType = ByteContentItem.BytesType.IMAGE_PNG; - break; - case "image/svg": - bytesType = ByteContentItem.BytesType.IMAGE_SVG; - break; - default: - bytesType = ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED; - break; - } - - byte[] data = Files.readAllBytes(Paths.get(filePath)); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .build(); - - ByteContentItem byteContentItem = - ByteContentItem.newBuilder() - .setType(bytesType) - .setData(ByteString.copyFrom(data)) - .build(); - - List imageRedactionConfigs = - infoTypes - .stream() - .map( - infoType -> - RedactImageRequest.ImageRedactionConfig.newBuilder() - .setInfoType(infoType) - .build()) - .collect(Collectors.toList()); - - RedactImageRequest redactImageRequest = - RedactImageRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .addAllImageRedactionConfigs(imageRedactionConfigs) - .setByteItem(byteContentItem) - .setInspectConfig(inspectConfig) - .build(); - - RedactImageResponse redactImageResponse = dlpClient.redactImage(redactImageRequest); - - // redacted image data - ByteString redactedImageData = redactImageResponse.getRedactedImage(); - FileOutputStream outputStream = new FileOutputStream(outputPath); - outputStream.write(redactedImageData.toByteArray()); - outputStream.close(); - } - } - // [END dlp_redact_image] - - /** Command line application to redact strings, images using the Data Loss Prevention API. */ - public static void main(String[] args) throws Exception { - - Options commandLineOptions = new Options(); - - Option minLikelihoodOption = - Option.builder("minLikelihood").hasArg(true).required(false).build(); - - commandLineOptions.addOption(minLikelihoodOption); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - Option inputFilePathOption = - Option.builder("f").hasArg(true).longOpt("inputFilePath").required(false).build(); - commandLineOptions.addOption(inputFilePathOption); - - Option outputFilePathOption = - Option.builder("o").hasArg(true).longOpt("outputFilePath").required(false).build(); - - commandLineOptions.addOption(outputFilePathOption); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(Redact.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - List infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - if (infoTypes != null) { - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - Likelihood minLikelihood = - Likelihood.valueOf( - cmd.getOptionValue( - minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); - - String inputFilePath = cmd.getOptionValue(inputFilePathOption.getOpt()); - String outputFilePath = cmd.getOptionValue(outputFilePathOption.getOpt()); - String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); - redactImage(inputFilePath, minLikelihood, infoTypesList, outputFilePath, projectId); - } -} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java index da4c5eb88c6..72e2cb6cf6d 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java @@ -218,7 +218,7 @@ public static void main(String[] args) throws Exception { cmd = parser.parse(commandLineOptions, args); } catch (ParseException e) { System.out.println(e.getMessage()); - formatter.printHelp(Redact.class.getName(), commandLineOptions); + formatter.printHelp("dlp_snippets", commandLineOptions); System.exit(1); return; } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java new file mode 100644 index 00000000000..7c8dd6d0bd5 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_image_file] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.List; + +public class InspectImageFile { + + // Inspects the specified image file. + public static void inspectImageFile(String projectId, String filePath) { + // String projectId = "my-project-id"; + // String filePath = "path/to/image.png"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); + ByteContentItem byteItem = ByteContentItem.newBuilder() + .setType(BytesType.IMAGE) + .setData(fileBytes) + .build(); + ContentItem item = ContentItem.newBuilder() + .setByteItem(byteItem) + .build(); + + // Specify the type of info the inspection will look for. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Construct the configuration for the Inspect request. + InspectConfig config = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results. + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectImageFile: \n" + e.toString()); + } + } +} +// [END dlp_inspect_image_file] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java new file mode 100644 index 00000000000..a6a178dd529 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -0,0 +1,90 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.List; + +public class InspectString { + + // Inspects the provided text. + public static void inspectString(String projectId, String textToInspect) { + // String projectId = "my-project-id"; + // String textToInspect = "My name is Gary and my email is gary@example.com"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteContentItem byteItem = ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Construct the configuration for the Inspect request. + InspectConfig config = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_string] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java new file mode 100644 index 00000000000..335e2fcbe47 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_file] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.List; + +public class InspectTextFile { + + // Inspects the specified text file. + public static void inspectTextFile(String projectId, String filePath) { + // String projectId = "my-project-id"; + // String filePath = "path/to/image.png"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); + ByteContentItem byteItem = ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(fileBytes) + .build(); + ContentItem item = ContentItem.newBuilder() + .setByteItem(byteItem) + .build(); + + // Specify the type of info the inspection will look for. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Construct the configuration for the Inspect request. + InspectConfig config = InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectFile: \n" + e.toString()); + } + } +} +// [END dlp_inspect_file] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java new file mode 100644 index 00000000000..bbf4bc53184 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -0,0 +1,88 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_redact_image] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.util.ArrayList; +import java.util.List; + +class RedactImageFile { + + static void redactImageFile(String projectId, String filePath) { + // String projectId = "my-project-id"; + // String filePath = "path/to/image.png"; + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the content to be inspected. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE).setData(fileBytes).build(); + + // Specify the type of info and likelihood necessary to redact. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setMinLikelihood(Likelihood.LIKELY) + .build(); + + // Construct the Redact request to be sent by the client. + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(project.toString()) + .setByteItem(byteItem) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + RedactImageResponse response = dlp.redactImage(request); + + // Parse the response and process results. + String outputPath = "redacted.png"; + FileOutputStream redacted = new FileOutputStream(outputPath); + redacted.write(response.getRedactedImage().toByteArray()); + redacted.close(); + System.out.println("Redacted image written to " + outputPath); + + } catch (Exception e) { + System.out.println("Error during inspectFile: \n" + e.toString()); + } + } +} +// [END dlp_redact_image] diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java index 17814cfc395..ae66bacf5d6 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java @@ -53,74 +53,6 @@ public void setUp() { assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); } - @Test - public void testStringInspectionReturnsInfoTypes() throws Exception { - String text = - "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; - Inspect.main(new String[] {"-s", text, "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"}); - String output = bout.toString(); - - assertThat(output, containsString("PHONE_NUMBER")); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - - @Test - public void testStringInspectionReturnsCustomInfoTypes() throws Exception { - String text = - "\"My phone number is (234) 456-7890 and my email address is gary@somedomain.com\""; - Inspect.main( - new String[] { - "-s", - text, - "-customDictionaries", - "gary@somedomain.com", - "-customRegexes", - "\\(\\d{3}\\) \\d{3}-\\d{4}" - }); - String output = bout.toString(); - - assertThat(output, containsString("CUSTOM_DICTIONARY_0")); - assertThat(output, containsString("CUSTOM_REGEX_0")); - } - - @Test - public void testTextFileInspectionReturnsInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-f", "src/test/resources/test.txt", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" - }); - String output = bout.toString(); - assertThat(output, containsString("PHONE_NUMBER")); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - - @Test - public void testTextFileInspectionReturnsCustomInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-f", - "src/test/resources/test.txt", - "-customDictionaries", - "gary@somedomain.com", - "-customRegexes", - "\\(\\d{3}\\) \\d{3}-\\d{4}" - }); - String output = bout.toString(); - assertThat(output, containsString("CUSTOM_DICTIONARY_0")); - assertThat(output, containsString("CUSTOM_REGEX_0")); - } - - @Test - public void testImageFileInspectionReturnsInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-f", "src/test/resources/test.png", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS" - }); - String output = bout.toString(); - assertThat(output, containsString("PHONE_NUMBER")); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - // Requires that bucket by the specified name exists @Test public void testGcsFileInspectionReturnsInfoTypes() throws Exception { diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java deleted file mode 100644 index 5708fae6211..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RedactIT.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class RedactIT { - - // CHECKSTYLE ON: AbbreviationAsWordInName - private ByteArrayOutputStream bout; - private PrintStream out; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - @Test - public void testRedactImage() throws Exception { - // InspectIT Tests verify original has PII present - String outputFilePath = "src/test/resources/output.png"; - - // Restrict phone number, but not email - Redact.main( - new String[] { - "-f", "src/test/resources/test.png", - "-infoTypes", "PHONE_NUMBER", - "-o", outputFilePath - }); - bout.reset(); - - // Verify that phone_number is missing but email is present - Inspect.main( - new String[] {"-f", outputFilePath, "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"}); - String output = bout.toString(); - assertThat(output, not(containsString("PHONE_NUMBER"))); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java new file mode 100644 index 00000000000..6c64a19b9c5 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -0,0 +1,91 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import static junit.framework.TestCase.assertNotNull; +import static org.junit.Assert.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.hamcrest.CoreMatchers; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class InspectTests { + + private ByteArrayOutputStream bout; + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + private static void requireEnvVar(String varName) { + assertNotNull( + System.getenv(varName), + "Environment variable '%s' is required to perform these tests.".format(varName) + ); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void beforeTest() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testInspectString() { + InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); + + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + } + + @Test + public void textInspectTestFile() { + InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); + + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Info type: PHONE_NUMBER")); + assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + } + + + @Test + public void testInspectImageFile() { + InspectImageFile.inspectImageFile(PROJECT_ID, "src/test/resources/test.png"); + + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Info type: PHONE_NUMBER")); + assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + } + +} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java new file mode 100644 index 00000000000..475b9485a8d --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import static junit.framework.TestCase.assertNotNull; +import static org.junit.Assert.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.hamcrest.CoreMatchers; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class RedactTests { + + private ByteArrayOutputStream bout; + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + private static void requireEnvVar(String varName) { + assertNotNull( + System.getenv(varName), + "Environment variable '%s' is required to perform these tests.".format(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void beforeTest() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testRedactImage() { + RedactImageFile.redactImageFile(PROJECT_ID, "src/test/resources/test.png"); + + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Redacted image written")); + } +} diff --git a/dlp/snippets/snippets/src/test/resources/test.png b/dlp/snippets/snippets/src/test/resources/test.png index 8f32c825884261083b7d731676375303d49ca6f6..748f46cdcb504479bc1018fa16ab90dfb95aee5e 100644 GIT binary patch literal 5109 zcmVTfl&E-1Qo{DFY7R7DU7 zO(c{MNKZ&eZ=_E$X_LwHH}C%bNWehe8zux-bm#k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Y#LWvTNjqMfl@&U5FgMg6&w}k({KmNCGb{vqo6h5RH zc13&2;tlbF!-)~xu$VC0f3F+8y`E3zqU|O5qu3i2CwW`%JsDo%DtxEV{{{5xpAT9z M)pS)Wl`TL24{iKN9{>OV diff --git a/dlp/snippets/snippets/src/test/resources/test.txt b/dlp/snippets/snippets/src/test/resources/test.txt index c2ee3815bc9..f30af240c72 100644 --- a/dlp/snippets/snippets/src/test/resources/test.txt +++ b/dlp/snippets/snippets/src/test/resources/test.txt @@ -1 +1 @@ -My phone number is (223) 456-7890 and my email address is gary@somedomain.com. \ No newline at end of file +My phone number is (223) 456-7890 and my email address is gary@example.com. \ No newline at end of file From 6a2250c2b26f75d0e519fab0fd51dc974141220f Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Mon, 28 Oct 2019 16:09:35 -0700 Subject: [PATCH 047/406] samples: Update sample format guidelines. (#1582) --- .../java/dlp/snippets/InspectImageFile.java | 10 +++-- .../main/java/dlp/snippets/InspectString.java | 10 +++-- .../java/dlp/snippets/InspectTextFile.java | 37 +++++++++---------- .../java/dlp/snippets/RedactImageFile.java | 10 +++-- 4 files changed, 39 insertions(+), 28 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 7c8dd6d0bd5..8cb01a3681a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -34,11 +34,15 @@ public class InspectImageFile { + public static void inspectString() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String textToInspect = "My name is Gary and my email is gary@example.com"; + inspectString(projectId, textToInspect); + } + // Inspects the specified image file. public static void inspectImageFile(String projectId, String filePath) { - // String projectId = "my-project-id"; - // String filePath = "path/to/image.png"; - // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index a6a178dd529..6b47b5a58fc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -33,11 +33,15 @@ public class InspectString { + public static void inspectString() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String textToInspect = "My name is Gary and my email is gary@example.com"; + inspectString(projectId, textToInspect); + } + // Inspects the provided text. public static void inspectString(String projectId, String textToInspect) { - // String projectId = "my-project-id"; - // String textToInspect = "My name is Gary and my email is gary@example.com"; - // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index 335e2fcbe47..3eee7c9ce40 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -34,11 +34,15 @@ public class InspectTextFile { + public static void inspectTextFile() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String filePath = "path/to/image.png"; + inspectTextFile(projectId, filePath); + } + // Inspects the specified text file. public static void inspectTextFile(String projectId, String filePath) { - // String projectId = "my-project-id"; - // String filePath = "path/to/image.png"; - // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -48,13 +52,9 @@ public static void inspectTextFile(String projectId, String filePath) { // Specify the type and content to be inspected. ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); - ByteContentItem byteItem = ByteContentItem.newBuilder() - .setType(BytesType.TEXT_UTF8) - .setData(fileBytes) - .build(); - ContentItem item = ContentItem.newBuilder() - .setByteItem(byteItem) - .build(); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.TEXT_UTF8).setData(fileBytes).build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); @@ -64,17 +64,16 @@ public static void inspectTextFile(String projectId, String filePath) { } // Construct the configuration for the Inspect request. - InspectConfig config = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig config = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. - InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) - .setItem(item) - .setInspectConfig(config) - .build(); + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); // Use the client to send the API request. InspectContentResponse response = dlp.inspectContent(request); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index bbf4bc53184..64665bd8c9e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -34,10 +34,14 @@ class RedactImageFile { - static void redactImageFile(String projectId, String filePath) { - // String projectId = "my-project-id"; - // String filePath = "path/to/image.png"; + public static void redactImageFile() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String filePath = "path/to/image.png"; + redactImageFile(projectId, filePath); + } + static void redactImageFile(String projectId, String filePath) { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. From f32058191edb1160adc6b37e48ff27546a4599dc Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Fri, 13 Dec 2019 10:24:12 -0800 Subject: [PATCH 048/406] samples: Fix compilation failure when running mvn clean package -DskipTests (#1795) InspectImageFile sample was failing to compile when running `mvn clean package`. Updated the method to pass sample arguments as in `RedactImageFile`. Rebuilt successfully. --- .../src/main/java/dlp/snippets/InspectImageFile.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 8cb01a3681a..69071565cac 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -34,11 +34,11 @@ public class InspectImageFile { - public static void inspectString() { + public static void inspectImageFile() { // TODO(developer): Replace these variables before running the sample. String projectId = "my-project-id"; - String textToInspect = "My name is Gary and my email is gary@example.com"; - inspectString(projectId, textToInspect); + String filePath = "path/to/image.png"; + inspectImageFile(projectId, filePath); } // Inspects the specified image file. From 8cbb2754c60be01352c746f6600ad97140c1dab0 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Fri, 27 Dec 2019 10:34:20 -0800 Subject: [PATCH 049/406] samples: Cleanup DLP Inspect snippets. (#1911) * Update Inspect GCS snippet. * Update InspectDatatstoreEntity. * Update inspect bigquery sample. * Misc cleanup. * Increase timeout for tests. * Call nack on unprocessed pubusb call. --- .../com/example/dlp/DeIdentification.java | 3 +- .../main/java/com/example/dlp/Inspect.java | 644 ------------------ .../src/main/java/com/example/dlp/Jobs.java | 5 +- .../main/java/com/example/dlp/QuickStart.java | 3 +- .../java/com/example/dlp/RiskAnalysis.java | 3 +- .../main/java/com/example/dlp/Templates.java | 3 +- .../main/java/com/example/dlp/Triggers.java | 3 +- .../dlp/snippets/InspectBigQueryTable.java | 165 +++++ .../dlp/snippets/InspectDatastoreEntity.java | 167 +++++ .../java/dlp/snippets/InspectGcsFile.java | 151 ++++ .../java/dlp/snippets/InspectImageFile.java | 27 +- .../main/java/dlp/snippets/InspectString.java | 26 +- .../test/java/com/example/dlp/InspectIT.java | 127 ---- .../test/java/dlp/snippets/InspectTests.java | 80 ++- 14 files changed, 573 insertions(+), 834 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java index ab6c8683a72..b9b0a90b74a 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java @@ -16,7 +16,6 @@ package com.example.dlp; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.common.io.BaseEncoding; import com.google.privacy.dlp.v2.CharacterMaskConfig; @@ -665,7 +664,7 @@ public static void main(String[] args) throws Exception { // default to auto-detected project id when not explicitly provided String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt()); List infoTypesList = Collections.emptyList(); if (cmd.hasOption(infoTypesOption.getOpt())) { diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java deleted file mode 100644 index 7c1ab137178..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Inspect.java +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.api.core.SettableApiFuture; -import com.google.cloud.ServiceOptions; -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.cloud.pubsub.v1.Subscriber; -import com.google.privacy.dlp.v2.Action; -import com.google.privacy.dlp.v2.BigQueryOptions; -import com.google.privacy.dlp.v2.BigQueryTable; -import com.google.privacy.dlp.v2.ByteContentItem; -import com.google.privacy.dlp.v2.CloudStorageOptions; -import com.google.privacy.dlp.v2.ContentItem; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CustomInfoType; -import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; -import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; -import com.google.privacy.dlp.v2.CustomInfoType.Regex; -import com.google.privacy.dlp.v2.DatastoreOptions; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.Finding; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InfoTypeStats; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectConfig.FindingLimits; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectDataSourceDetails; -import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.InspectResult; -import com.google.privacy.dlp.v2.KindExpression; -import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.PartitionId; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.StorageConfig; -import com.google.protobuf.ByteString; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; -import java.net.URLConnection; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.activation.MimetypesFileTypeMap; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Inspect { - - // [START dlp_inspect_gcs] - /** - * Inspect GCS file for Info types and wait on job completion using Google Cloud Pub/Sub - * notification - * - * @param bucketName The name of the bucket where the file resides. - * @param fileName The path to the file within the bucket to inspect (can include wildcards, eg. - * my-image.*) - * @param minLikelihood The minimum likelihood required before returning a match - * @param infoTypes The infoTypes of information to match - * @param maxFindings The maximum number of findings to report (0 = server maximum) - * @param topicId Google Cloud Pub/Sub topic Id to notify of job status - * @param subscriptionId Google Cloud Subscription to above topic to listen for job status updates - * @param projectId Google Cloud project ID - */ - private static void inspectGcsFile( - String bucketName, - String fileName, - Likelihood minLikelihood, - List infoTypes, - List customInfoTypes, - int maxFindings, - String topicId, - String subscriptionId, - String projectId) - throws Exception { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder() - .setFileSet( - CloudStorageOptions.FileSet.newBuilder() - .setUrl("gs://" + bucketName + "/" + fileName)) - .build(); - - StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); - - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .addAllCustomInfoTypes(customInfoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .build(); - - String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); - Action.PublishToPubSub publishToPubSub = - Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); - - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setStorageConfig(storageConfig) - .setInspectConfig(inspectConfig) - .addActions(action) - .build(); - - // Semi-synchronously submit an inspect job, and wait on results - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectJob(inspectJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - - System.out.println("Job created with ID:" + dlpJob.getName()); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.of(projectId, subscriptionId), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage - .getAttributesMap() - .get("DlpJobName") - .equals(dlpJob.getName())) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (Exception e) { - System.out.println("Unable to verify job completion."); - } - - DlpJob completedJob = - dlpServiceClient.getDlpJob( - GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); - - System.out.println("Job status: " + completedJob.getState()); - InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); - InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); - if (result.getInfoTypeStatsCount() > 0) { - System.out.println("Findings: "); - for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { - System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); - System.out.println("\tCount: " + infoTypeStat.getCount()); - } - } else { - System.out.println("No findings."); - } - } - } - // [END dlp_inspect_gcs] - - // [START dlp_inspect_datastore] - /** - * Inspect a Datastore kind - * - * @param projectId The project ID containing the target Datastore - * @param namespaceId The ID namespace of the Datastore document to inspect - * @param kind The kind of the Datastore entity to inspect - * @param minLikelihood The minimum likelihood required before returning a match - * @param infoTypes The infoTypes of information to match - * @param maxFindings max number of findings - * @param topicId Google Cloud Pub/Sub topic to notify job status updates - * @param subscriptionId Google Cloud Pub/Sub subscription to above topic to receive status - * updates - */ - private static void inspectDatastore( - String projectId, - String namespaceId, - String kind, - Likelihood minLikelihood, - List infoTypes, - List customInfoTypes, - int maxFindings, - String topicId, - String subscriptionId) { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // Reference to the Datastore namespace - PartitionId partitionId = - PartitionId.newBuilder().setProjectId(projectId).setNamespaceId(namespaceId).build(); - - // Reference to the Datastore kind - KindExpression kindExpression = KindExpression.newBuilder().setName(kind).build(); - DatastoreOptions datastoreOptions = - DatastoreOptions.newBuilder().setKind(kindExpression).setPartitionId(partitionId).build(); - - // Construct Datastore configuration to be inspected - StorageConfig storageConfig = - StorageConfig.newBuilder().setDatastoreOptions(datastoreOptions).build(); - - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .addAllCustomInfoTypes(customInfoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .build(); - - String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); - Action.PublishToPubSub publishToPubSub = - Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); - - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setStorageConfig(storageConfig) - .setInspectConfig(inspectConfig) - .addActions(action) - .build(); - - // Asynchronously submit an inspect job, and wait on results - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectJob(inspectJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - - System.out.println("Job created with ID:" + dlpJob.getName()); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.of(projectId, subscriptionId), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage - .getAttributesMap() - .get("DlpJobName") - .equals(dlpJob.getName())) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (Exception e) { - System.out.println("Unable to verify job completion."); - } - - DlpJob completedJob = - dlpServiceClient.getDlpJob( - GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); - - System.out.println("Job status: " + completedJob.getState()); - InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); - InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); - if (result.getInfoTypeStatsCount() > 0) { - System.out.println("Findings: "); - for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { - System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); - System.out.println("\tCount: " + infoTypeStat.getCount()); - } - } else { - System.out.println("No findings."); - } - } catch (Exception e) { - System.out.println("inspectDatastore Problems: " + e.getMessage()); - } - } - // [END dlp_inspect_datastore] - - // [START dlp_inspect_bigquery] - /** - * Inspect a BigQuery table - * - * @param projectId The project ID to run the API call under - * @param datasetId The ID of the dataset to inspect, e.g. 'my_dataset' - * @param tableId The ID of the table to inspect, e.g. 'my_table' - * @param minLikelihood The minimum likelihood required before returning a match - * @param infoTypes The infoTypes of information to match - * @param maxFindings The maximum number of findings to report (0 = server maximum) - * @param topicId Topic ID for pubsub. - * @param subscriptionId Subscription ID for pubsub. - */ - private static void inspectBigquery( - String projectId, - String datasetId, - String tableId, - Likelihood minLikelihood, - List infoTypes, - List customInfoTypes, - int maxFindings, - String topicId, - String subscriptionId) { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // Reference to the BigQuery table - BigQueryTable tableReference = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); - BigQueryOptions bigQueryOptions = - BigQueryOptions.newBuilder().setTableReference(tableReference).build(); - - // Construct BigQuery configuration to be inspected - StorageConfig storageConfig = - StorageConfig.newBuilder().setBigQueryOptions(bigQueryOptions).build(); - - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .addAllCustomInfoTypes(customInfoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .build(); - - ProjectTopicName topic = ProjectTopicName.of(projectId, topicId); - Action.PublishToPubSub publishToPubSub = - Action.PublishToPubSub.newBuilder().setTopic(topic.toString()).build(); - - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setStorageConfig(storageConfig) - .setInspectConfig(inspectConfig) - .addActions(action) - .build(); - - // Asynchronously submit an inspect job, and wait on results - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectJob(inspectJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - - System.out.println("Job created with ID:" + dlpJob.getName()); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.of(projectId, subscriptionId), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage - .getAttributesMap() - .get("DlpJobName") - .equals(dlpJob.getName())) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (Exception e) { - System.out.println("Unable to verify job completion."); - } - - DlpJob completedJob = - dlpServiceClient.getDlpJob( - GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build()); - - System.out.println("Job status: " + completedJob.getState()); - InspectDataSourceDetails inspectDataSourceDetails = completedJob.getInspectDetails(); - InspectDataSourceDetails.Result result = inspectDataSourceDetails.getResult(); - if (result.getInfoTypeStatsCount() > 0) { - System.out.println("Findings: "); - for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { - System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); - System.out.println("\tCount: " + infoTypeStat.getCount()); - } - } else { - System.out.println("No findings."); - } - } catch (Exception e) { - System.out.println("inspectBigquery Problems: " + e.getMessage()); - } - } - // [END dlp_inspect_bigquery] - - /** - * Command line application to inspect data using the Data Loss Prevention API. Supported data - * formats: string, file, text file on GCS, BigQuery table, and Datastore entity - */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - Option stringOption = new Option("s", "string", true, "inspect string"); - optionsGroup.addOption(stringOption); - - Option fileOption = new Option("f", "file path", true, "inspect input file path"); - optionsGroup.addOption(fileOption); - - Option gcsOption = new Option("gcs", "Google Cloud Storage", false, "inspect GCS file"); - optionsGroup.addOption(gcsOption); - - Option datastoreOption = new Option("ds", "Google Datastore", false, "inspect Datastore kind"); - optionsGroup.addOption(datastoreOption); - - Option bigqueryOption = new Option("bq", "Google BigQuery", false, "inspect BigQuery table"); - optionsGroup.addOption(bigqueryOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option minLikelihoodOption = - Option.builder("minLikelihood").hasArg(true).required(false).build(); - - commandLineOptions.addOption(minLikelihoodOption); - - Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); - - commandLineOptions.addOption(maxFindingsOption); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - Option customDictionariesOption = - Option.builder("customDictionaries").hasArg(true).required(false).build(); - customDictionariesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(customDictionariesOption); - - Option customRegexesOption = - Option.builder("customRegexes").hasArg(true).required(false).build(); - customRegexesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(customRegexesOption); - - Option includeQuoteOption = Option.builder("includeQuote").hasArg(true).required(false).build(); - commandLineOptions.addOption(includeQuoteOption); - - Option bucketNameOption = Option.builder("bucketName").hasArg(true).required(false).build(); - commandLineOptions.addOption(bucketNameOption); - - Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); - commandLineOptions.addOption(gcsFileNameOption); - - Option datasetIdOption = Option.builder("datasetId").hasArg(true).required(false).build(); - commandLineOptions.addOption(datasetIdOption); - - Option tableIdOption = Option.builder("tableId").hasArg(true).required(false).build(); - commandLineOptions.addOption(tableIdOption); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - Option topicIdOption = Option.builder("topicId").hasArg(true).required(false).build(); - commandLineOptions.addOption(topicIdOption); - - Option subscriptionIdOption = - Option.builder("subscriptionId").hasArg(true).required(false).build(); - commandLineOptions.addOption(subscriptionIdOption); - - Option datastoreNamespaceOption = - Option.builder("namespace").hasArg(true).required(false).build(); - commandLineOptions.addOption(datastoreNamespaceOption); - - Option datastoreKindOption = Option.builder("kind").hasArg(true).required(false).build(); - commandLineOptions.addOption(datastoreKindOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(Inspect.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - Likelihood minLikelihood = - Likelihood.valueOf( - cmd.getOptionValue( - minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); - int maxFindings = Integer.parseInt(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); - boolean includeQuote = - Boolean.parseBoolean(cmd.getOptionValue(includeQuoteOption.getOpt(), "true")); - - String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); - String topicId = cmd.getOptionValue(topicIdOption.getOpt()); - String subscriptionId = cmd.getOptionValue(subscriptionIdOption.getOpt()); - - List infoTypesList = Collections.emptyList(); - if (cmd.hasOption(infoTypesOption.getOpt())) { - infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - - List customInfoTypesList = new ArrayList<>(); - if (cmd.hasOption(customDictionariesOption.getOpt())) { - String[] dictionaryStrings = cmd.getOptionValues(customDictionariesOption.getOpt()); - for (int i = 0; i < dictionaryStrings.length; i++) { - String[] dictionaryWords = dictionaryStrings[i].split(","); - CustomInfoType customInfoType = - CustomInfoType - .newBuilder() - .setInfoType( - InfoType.newBuilder().setName(String.format("CUSTOM_DICTIONARY_%s", i))) - .setDictionary( - Dictionary - .newBuilder() - .setWordList( - WordList - .newBuilder() - .addAllWords(Arrays.asList(dictionaryWords)))) - .build(); - customInfoTypesList.add(customInfoType); - } - } - if (cmd.hasOption(customRegexesOption.getOpt())) { - String[] patterns = cmd.getOptionValues(customRegexesOption.getOpt()); - for (int i = 0; i < patterns.length; i++) { - CustomInfoType customInfoType = - CustomInfoType - .newBuilder() - .setInfoType(InfoType.newBuilder().setName(String.format("CUSTOM_REGEX_%s", i))) - .setRegex(Regex.newBuilder().setPattern(patterns[i])) - .build(); - customInfoTypesList.add(customInfoType); - } - } - - // string inspection - if (cmd.hasOption("gcs")) { - String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); - String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); - inspectGcsFile( - bucketName, - fileName, - minLikelihood, - infoTypesList, - customInfoTypesList, - maxFindings, - topicId, - subscriptionId, - projectId); - // datastore kind inspection - } else if (cmd.hasOption("ds")) { - String namespaceId = cmd.getOptionValue(datastoreNamespaceOption.getOpt(), ""); - String kind = cmd.getOptionValue(datastoreKindOption.getOpt()); - // use default project id when project id is not specified - inspectDatastore( - projectId, - namespaceId, - kind, - minLikelihood, - infoTypesList, - customInfoTypesList, - maxFindings, - topicId, - subscriptionId); - } else if (cmd.hasOption("bq")) { - String datasetId = cmd.getOptionValue(datasetIdOption.getOpt()); - String tableId = cmd.getOptionValue(tableIdOption.getOpt()); - // use default project id when project id is not specified - inspectBigquery( - projectId, - datasetId, - tableId, - minLikelihood, - infoTypesList, - customInfoTypesList, - maxFindings, - topicId, - subscriptionId); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java index 43ed11dd4ab..51195ee94ba 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java @@ -16,7 +16,6 @@ package com.example.dlp; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.DeleteDlpJobRequest; import com.google.privacy.dlp.v2.DlpJob; @@ -122,13 +121,13 @@ public static void main(String[] args) throws Exception { cmd = parser.parse(commandLineOptions, args); } catch (ParseException e) { System.out.println(e.getMessage()); - formatter.printHelp(Inspect.class.getName(), commandLineOptions); + formatter.printHelp(Jobs.class.getName(), commandLineOptions); System.exit(1); return; } String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt()); if (cmd.hasOption(listOption.getOpt())) { String filter = cmd.getOptionValue(filterOption.getOpt(), ""); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java index 52946585907..8ba44f989a6 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java @@ -16,7 +16,6 @@ package com.example.dlp; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; import com.google.privacy.dlp.v2.ContentItem; @@ -78,7 +77,7 @@ public static void main(String[] args) throws Exception { .build(); ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); - String projectId = ServiceOptions.getDefaultProjectId(); + String projectId = ""; InspectContentRequest request = InspectContentRequest.newBuilder() .setParent(ProjectName.of(projectId).toString()) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java index 161129d311b..746d15518a6 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java @@ -17,7 +17,6 @@ package com.example.dlp; import com.google.api.core.SettableApiFuture; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.Subscriber; import com.google.privacy.dlp.v2.Action; @@ -799,7 +798,7 @@ public static void main(String[] args) throws Exception { String tableId = cmd.getOptionValue(tableIdOption.getOpt()); // use default project id when project id is not specified String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt()); String regionCode = cmd.getOptionValue(regionCodeOption.getOpt(), "US"); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java index 72e2cb6cf6d..d59c6d52a8f 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java @@ -16,7 +16,6 @@ package com.example.dlp; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPage; import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; @@ -224,7 +223,7 @@ public static void main(String[] args) throws Exception { } String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt(), ""); if (cmd.hasOption(createOption.getOpt())) { String templateId = cmd.getOptionValue(templateIdOption.getOpt()); diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java index 86601734895..16b1634232e 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java @@ -16,7 +16,6 @@ package com.example.dlp; -import com.google.cloud.ServiceOptions; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CreateJobTriggerRequest; @@ -268,7 +267,7 @@ public static void main(String[] args) throws Exception { } String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ServiceOptions.getDefaultProjectId()); + cmd.getOptionValue(projectIdOption.getOpt()); if (cmd.hasOption("c")) { Likelihood minLikelihood = Likelihood.valueOf( diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java new file mode 100644 index 00000000000..40fa071ea4e --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -0,0 +1,165 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_gcs] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.common.util.concurrent.SettableFuture; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.BigQueryOptions; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class InspectBigQueryTable { + + public static void inspectBigQueryTable() + throws InterruptedException, ExecutionException, IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String bigQueryDatasetId = "your-bigquery-dataset-id"; + String bigQueryTableId = "your-bigquery-table-id"; + String pubSubTopicId = "your-pubsub-topic-id"; + String pubSubSubscriptionId = "your-pubsub-subscription-id"; + inspectBigQueryTable( + projectId, bigQueryDatasetId, bigQueryTableId, pubSubTopicId, pubSubSubscriptionId); + } + + // Inspects a BigQuery Table + public static void inspectBigQueryTable( + String projectId, + String bigQueryDatasetId, + String bigQueryTableId, + String pubSubTopicId, + String pubSubSubscriptionName) + throws ExecutionException, InterruptedException, IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the BigQuery table to be inspected. + BigQueryTable tableReference = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(bigQueryDatasetId) + .setTableId(bigQueryTableId) + .build(); + + BigQueryOptions bigQueryOptions = + BigQueryOptions.newBuilder().setTableReference(tableReference).build(); + + StorageConfig storageConfig = + StorageConfig.newBuilder().setBigQueryOptions(bigQueryOptions).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + // Specify how the content should be inspected. + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + + // Specify the action that is triggered when the job completes. + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the long running job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Create the request for the job configured above. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Use the client to send the request. + final DlpJob job = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + job.getName()); + + // Set up a Pub/Sub subscriber to listen for the job completion status + SettableFuture jobDone = SettableFuture.create(); + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); + MessageReceiver handleMessage = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + jobDone.set(null); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); + subscriber.startAsync(); // Let the subscriber listen to messages + + // Wait for the original job to complete + try { + jobDone.get(10, TimeUnit.MINUTES); + } catch (TimeoutException e) { + System.out.println("Job was not completed after 10 minutes."); + return; + } + + // Get the latest state of the job from the service + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + DlpJob completedJob = dlp.getDlpJob(request); + + // Parse the response and process results. + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); + System.out.println("Findings: "); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); + } + } + } +} +// [END dlp_inspect_gcs] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java new file mode 100644 index 00000000000..1d35fd7c34c --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -0,0 +1,167 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_datastore] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.common.util.concurrent.SettableFuture; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DatastoreOptions; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.KindExpression; +import com.google.privacy.dlp.v2.PartitionId; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class InspectDatastoreEntity { + + public static void insepctDatastoreEntity() + throws InterruptedException, ExecutionException, IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datastoreNamespace = "your-datastore-namespace"; + String datastoreKind = "your-datastore-kind"; + String pubSubTopicId = "your-pubsub-topic-id"; + String pubSubSubscriptionId = "your-pubsub-subscription-id"; + insepctDatastoreEntity( + projectId, datastoreNamespace, datastoreKind, pubSubTopicId, pubSubSubscriptionId); + } + + // Inspects a Datastore Entity. + public static void insepctDatastoreEntity( + String projectId, + String datastoreNamespce, + String datastoreKind, + String pubSubTopicId, + String pubSubSubscriptionName) + throws ExecutionException, InterruptedException, IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the Datastore entity to be inspected. + PartitionId partitionId = + PartitionId.newBuilder() + .setProjectId(projectId) + .setNamespaceId(datastoreNamespce) + .build(); + KindExpression kindExpression = KindExpression.newBuilder().setName(datastoreKind).build(); + + DatastoreOptions datastoreOptions = + DatastoreOptions.newBuilder().setKind(kindExpression).setPartitionId(partitionId).build(); + + StorageConfig storageConfig = + StorageConfig.newBuilder().setDatastoreOptions(datastoreOptions).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + // Specify how the content should be inspected. + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + + // Specify the action that is triggered when the job completes. + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the long running job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Create the request for the job configured above. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Use the client to send the request. + final DlpJob job = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + job.getName()); + + // Set up a Pub/Sub subscriber to listen for the job completion status + SettableFuture jobDone = SettableFuture.create(); + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); + MessageReceiver handleMessage = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + jobDone.set(null); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + ; + } + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); + subscriber.startAsync(); // Let the subscriber listen to messages + + // Wait for the original job to complete + try { + jobDone.get(10, TimeUnit.MINUTES); + } catch (TimeoutException e) { + System.out.println("Job was not completed after 10 minutes."); + return; + } + + // Get the latest state of the job from the service + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + DlpJob completedJob = dlp.getDlpJob(request); + + // Parse the response and process results. + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); + System.out.println("Findings: "); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); + } + } + } +} +// [END dlp_inspect_datastore] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java new file mode 100644 index 00000000000..e1cfd49f9bf --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -0,0 +1,151 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_gcs] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.common.util.concurrent.SettableFuture; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class InspectGcsFile { + + public static void inspectGcsFile() throws InterruptedException, ExecutionException, IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/image.png"; + String pubSubTopicId = "your-pubsub-topic-id"; + String pubSubSubscriptionId = "your-pubsub-subscription-id"; + inspectGcsFile(projectId, gcsUri, pubSubTopicId, pubSubSubscriptionId); + } + + // Inspects a file in a Google Cloud Storage Bucket. + public static void inspectGcsFile( + String projectId, String gcsUri, String pubSubTopicId, String pubSubSubscriptionName) + throws ExecutionException, InterruptedException, IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the GCS file to be inspected. + FileSet fileSet = FileSet.newBuilder().setUrl(gcsUri).build(); + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder().setFileSet(fileSet).build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + // Specify how the content should be inspected. + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + + // Specify the action that is triggered when the job completes. + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the long running job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Create the request for the job configured above. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Use the client to send the request. + final DlpJob job = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + job.getName()); + + // Set up a Pub/Sub subscriber to listen for the job completion status + SettableFuture jobDone = SettableFuture.create(); + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); + MessageReceiver handleMessage = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + jobDone.set(null); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); + subscriber.startAsync(); // Let the subscriber listen to messages + + // Wait for the original job to complete + try { + jobDone.get(10, TimeUnit.MINUTES); + } catch (TimeoutException e) { + System.out.println("Job was not completed after 10 minutes."); + return; + } + + // Get the latest state of the job from the service + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + DlpJob completedJob = dlp.getDlpJob(request); + + // Parse the response and process results. + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); + System.out.println("Findings: "); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); + } + } + } +} +// [END dlp_inspect_gcs] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 69071565cac..b8e6a81626c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -52,13 +52,9 @@ public static void inspectImageFile(String projectId, String filePath) { // Specify the type and content to be inspected. ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); - ByteContentItem byteItem = ByteContentItem.newBuilder() - .setType(BytesType.IMAGE) - .setData(fileBytes) - .build(); - ContentItem item = ContentItem.newBuilder() - .setByteItem(byteItem) - .build(); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE).setData(fileBytes).build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); @@ -68,17 +64,16 @@ public static void inspectImageFile(String projectId, String filePath) { } // Construct the configuration for the Inspect request. - InspectConfig config = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig config = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. - InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) - .setItem(item) - .setInspectConfig(config) - .build(); + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); // Use the client to send the API request. InspectContentResponse response = dlp.inspectContent(request); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index 6b47b5a58fc..c41bc975510 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -50,10 +50,11 @@ public static void inspectString(String projectId, String textToInspect) { ProjectName project = ProjectName.of(projectId); // Specify the type and content to be inspected. - ByteContentItem byteItem = ByteContentItem.newBuilder() - .setType(BytesType.TEXT_UTF8) - .setData(ByteString.copyFromUtf8(textToInspect)) - .build(); + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Specify the type of info the inspection will look for. @@ -64,17 +65,16 @@ public static void inspectString(String projectId, String textToInspect) { } // Construct the configuration for the Inspect request. - InspectConfig config = InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig config = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. - InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) - .setItem(item) - .setInspectConfig(config) - .build(); + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); // Use the client to send the API request. InspectContentResponse response = dlp.inspectContent(request); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java deleted file mode 100644 index ae66bacf5d6..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/InspectIT.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class InspectIT { - // CHECKSTYLE ON: AbbreviationAsWordInName - - private ByteArrayOutputStream bout; - private PrintStream out; - - // Update to Google Cloud Storage path containing test.txt - private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; - private String topicId = "dlp-tests"; - private String subscriptionId = "dlp-test"; - - // Update to Google Cloud Datastore Kind containing an entity - // with phone number and email address properties. - private String datastoreKind = "dlp"; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - // Requires that bucket by the specified name exists - @Test - public void testGcsFileInspectionReturnsInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-gcs", - "-bucketName", - bucketName, - "-topicId", - topicId, - "-subscriptionId", - subscriptionId, - "-fileName", - "test.txt", - "-infoTypes", - "PHONE_NUMBER", - "EMAIL_ADDRESS" - }); - String output = bout.toString(); - assertThat(output, containsString("PHONE_NUMBER")); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - - // Requires a Datastore kind containing an entity - // with phone number and email address properties. - @Test - public void testDatastoreInspectionReturnsInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-ds", - "-kind", - datastoreKind, - "-topicId", - topicId, - "-subscriptionId", - subscriptionId, - "-infoTypes", - "PHONE_NUMBER", - "EMAIL_ADDRESS" - }); - String output = bout.toString(); - assertThat(output, containsString("PHONE_NUMBER")); - assertThat(output, containsString("EMAIL_ADDRESS")); - } - - @Test - public void testBigqueryInspectionReturnsInfoTypes() throws Exception { - Inspect.main( - new String[] { - "-bq", - "-datasetId", - "integration_tests_dlp", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId, - "-tableId", - "harmful", - "-infoTypes", - "PHONE_NUMBER", - "EMAIL_ADDRESS" - }); - String output = bout.toString(); - assertThat(output, containsString("PHONE_NUMBER")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 6c64a19b9c5..ff5cc779c58 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -16,15 +16,16 @@ package dlp.snippets; -import static junit.framework.TestCase.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertNotNull; import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.PrintStream; -import org.hamcrest.CoreMatchers; +import java.util.concurrent.ExecutionException; import org.junit.After; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,56 +37,93 @@ public class InspectTests { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + // TODO: Update as ENV_VARs + private static final String bucketName = PROJECT_ID + "/dlp"; + private static final String pubSubTopicId = "dlp-tests"; + private static final String pubSubSubscriptionId = "dlp-test"; + + private static final String datastoreNamespace = ""; + private static final String datastoreKind = "dlp"; + + private static final String BIGQUERY_DATASET = "integration_tests_dlp"; + private static void requireEnvVar(String varName) { assertNotNull( - System.getenv(varName), - "Environment variable '%s' is required to perform these tests.".format(varName) - ); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + @Before + public void checkRequirements() { + // requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("GOOGLE_CLOUD_PROJECT"); } @Before - public void beforeTest() { + public void captureOut() { bout = new ByteArrayOutputStream(); System.setOut(new PrintStream(bout)); } @After - public void tearDown() { + public void releaseOut() { System.setOut(null); bout.reset(); } @Test public void testInspectString() { - InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); + InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } @Test public void textInspectTestFile() { - InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); + InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + } + + @Test + public void testInspectImageFile() { + InspectImageFile.inspectImageFile(PROJECT_ID, "src/test/resources/test.png"); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Info type: PHONE_NUMBER")); - assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } + @Test + public void testInspectGcsFile() throws InterruptedException, ExecutionException, IOException { + String gcsUri = String.format("gs://%s/test.txt", bucketName); + InspectGcsFile.inspectGcsFile(PROJECT_ID, gcsUri, pubSubTopicId, pubSubSubscriptionId); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + } @Test - public void testInspectImageFile() { - InspectImageFile.inspectImageFile(PROJECT_ID, "src/test/resources/test.png"); + public void testInspectDatastoreEntity() + throws InterruptedException, ExecutionException, IOException { + InspectDatastoreEntity.insepctDatastoreEntity( + PROJECT_ID, datastoreNamespace, datastoreKind, pubSubTopicId, pubSubSubscriptionId); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Info type: PHONE_NUMBER")); - assertThat(output, CoreMatchers.containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } + @Test + public void testInspectBiqQueryTable() + throws InterruptedException, ExecutionException, IOException { + InspectBigQueryTable.inspectBigQueryTable( + PROJECT_ID, BIGQUERY_DATASET, "harmful", pubSubTopicId, pubSubSubscriptionId); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + } } From 77fa804a164165416dec4319b3137f86c7200fcc Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Fri, 27 Dec 2019 13:27:29 -0800 Subject: [PATCH 050/406] samples: Cleanup DLP Quickstart. (#1912) * Cleanup DLP Quickstart. * Fix region tag. --- .../dlp => dlp/snippets}/QuickStart.java | 96 ++++++++++--------- .../snippets/QuickstartTests.java} | 50 ++++++---- .../test/java/dlp/snippets/RedactTests.java | 9 +- 3 files changed, 85 insertions(+), 70 deletions(-) rename dlp/snippets/snippets/src/main/java/{com/example/dlp => dlp/snippets}/QuickStart.java (55%) rename dlp/snippets/snippets/src/test/java/{com/example/dlp/QuickStartIT.java => dlp/snippets/QuickstartTests.java} (53%) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java similarity index 55% rename from dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java rename to dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java index 8ba44f989a6..829c864dc93 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/QuickStart.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java @@ -14,7 +14,9 @@ * limitations under the License. */ -package com.example.dlp; +package dlp.snippets; + +// [START dlp_quickstart] import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; @@ -28,56 +30,58 @@ import com.google.privacy.dlp.v2.Likelihood; import com.google.privacy.dlp.v2.ProjectName; import com.google.protobuf.ByteString; -import java.util.Arrays; +import java.io.IOException; import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; -// [START dlp_quickstart] public class QuickStart { - /** Quick start to DLP API : inspects a given string for an InfoType. */ - public static void main(String[] args) throws Exception { - - // string to inspect - String text = "His name was Robert Frost"; - - // The minimum likelihood required before returning a match: - // LIKELIHOOD_UNSPECIFIED, VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, VERY_LIKELY, UNRECOGNIZED - Likelihood minLikelihood = Likelihood.POSSIBLE; - - // The maximum number of findings to report (0 = server maximum) - int maxFindings = 0; + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + quickstart(projectId); + } - // The infoTypes of information to match - List infoTypes = - Arrays.asList( - InfoType.newBuilder().setName("PERSON_NAME").build(), - InfoType.newBuilder().setName("US_STATE").build()); + public static void quickstart(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Configure that content that will be inspected + String text = "His name was Robert Frost"; + ByteContentItem byteContentItem = + ByteContentItem.newBuilder() + .setType(ByteContentItem.BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(text)) + .build(); + ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); - // Whether to include the matching string - boolean includeQuote = true; + // The types of information to match: + // See: https://cloud.google.com/dlp/docs/infotypes-reference + List infoTypes = + Stream.of("PERSON_NAME", "US_STATE") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // The minimum likelihood required before returning a match: + // See: https://cloud.google.com/dlp/docs/likelihood + Likelihood minLikelihood = Likelihood.POSSIBLE; + // The maximum number of findings to report (0 = server maximum) InspectConfig.FindingLimits findingLimits = - InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerItem(maxFindings).build(); + InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerItem(0).build(); + // Specify the inspection configuration InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) .setMinLikelihood(minLikelihood) .setLimits(findingLimits) - .setIncludeQuote(includeQuote) + .setIncludeQuote(true) .build(); - ByteContentItem byteContentItem = - ByteContentItem.newBuilder() - .setType(ByteContentItem.BytesType.TEXT_UTF8) - .setData(ByteString.copyFromUtf8(text)) - .build(); - ContentItem contentItem = ContentItem.newBuilder().setByteItem(byteContentItem).build(); - - String projectId = ""; + // Create the request from previous configs InspectContentRequest request = InspectContentRequest.newBuilder() .setParent(ProjectName.of(projectId).toString()) @@ -85,24 +89,22 @@ public static void main(String[] args) throws Exception { .setItem(contentItem) .build(); - // Inspect the text for info types + // Send the request to the service and receive the results InspectContentResponse response = dlpServiceClient.inspectContent(request); + // Process the results + System.out.println("Inspect of text complete: "); InspectResult result = response.getResult(); - if (result.getFindingsCount() > 0) { - System.out.println("Findings: "); - for (Finding finding : result.getFindingsList()) { - if (includeQuote) { - System.out.print("\tQuote: " + finding.getQuote()); - } - System.out.print("\tInfo type: " + finding.getInfoType().getName()); - System.out.println("\tLikelihood: " + finding.getLikelihood()); - } - } else { + if (result.getFindingsCount() < 0) { System.out.println("No findings."); + return; + } + System.out.println("Findings: "); + for (Finding finding : result.getFindingsList()) { + System.out.println("\tQuote: " + finding.getQuote()); + System.out.println("\tInfo type: " + finding.getInfoType().getName()); + System.out.println("\tLikelihood: " + finding.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error in inspectString: " + e.getMessage()); } } } diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java similarity index 53% rename from dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java rename to dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java index d62726ea2db..488396144b4 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/QuickStartIT.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google Inc. + * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,42 +14,46 @@ * limitations under the License. */ -package com.example.dlp; +package dlp.snippets; -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; +import static junit.framework.TestCase.assertNotNull; +import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.PrintStream; import org.junit.After; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class QuickStartIT { +public class QuickstartTests { - // CHECKSTYLE ON: AbbreviationAsWordInName private ByteArrayOutputStream bout; - private PrintStream out; - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } - @Test - public void testQuickStart() throws Exception { - QuickStart.main(new String[] {}); - String output = bout.toString(); - assertThat(output, containsString("PERSON_NAME")); + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void beforeTest() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); } @After @@ -57,4 +61,12 @@ public void tearDown() { System.setOut(null); bout.reset(); } + + @Test + public void testQuickstart() throws IOException { + QuickStart.quickstart(PROJECT_ID); + + String output = bout.toString(); + assertThat(output, containsString("Inspect of text complete")); + } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 475b9485a8d..906091d073c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -17,11 +17,11 @@ package dlp.snippets; import static junit.framework.TestCase.assertNotNull; +import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.hamcrest.CoreMatchers; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -38,10 +38,11 @@ public class RedactTests { private static void requireEnvVar(String varName) { assertNotNull( - System.getenv(varName), - "Environment variable '%s' is required to perform these tests.".format(varName)); + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); } + @BeforeClass public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); @@ -65,6 +66,6 @@ public void testRedactImage() { RedactImageFile.redactImageFile(PROJECT_ID, "src/test/resources/test.png"); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Redacted image written")); + assertThat(output, containsString("Redacted image written")); } } From 88414bf4cdc4c678e5a67153cf74f1051753bdd9 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Tue, 7 Jan 2020 12:28:22 -0800 Subject: [PATCH 051/406] samples: Update DLP de-identification samples. (#1927) * Cleanup deidentify with masking. * Cleanup Deidentify With FPE snippet. * Cleanup Reidentify samples. * Update DeIdentiyWithDateShift. * Update region tags and run formatter. * Refactor InfoType stream into a single builder. --- .../com/example/dlp/DeIdentification.java | 737 ------------------ .../main/java/com/example/dlp/Triggers.java | 2 +- .../dlp/snippets/DeIdentifyWithDateShift.java | 151 ++++ .../java/dlp/snippets/DeIdentifyWithFpe.java | 106 +++ .../dlp/snippets/DeIdentifyWithMasking.java | 83 ++ .../dlp/snippets/InspectBigQueryTable.java | 4 +- .../java/dlp/snippets/ReIdentifyWithFpe.java | 112 +++ .../com/example/dlp/DeIdentificationIT.java | 167 ---- .../dlp/snippets/DeIdentificationTests.java | 109 +++ .../test/java/dlp/snippets/InspectTests.java | 2 +- 10 files changed, 565 insertions(+), 908 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java deleted file mode 100644 index b9b0a90b74a..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/DeIdentification.java +++ /dev/null @@ -1,737 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.common.io.BaseEncoding; -import com.google.privacy.dlp.v2.CharacterMaskConfig; -import com.google.privacy.dlp.v2.ContentItem; -import com.google.privacy.dlp.v2.CryptoKey; -import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; -import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; -import com.google.privacy.dlp.v2.CustomInfoType; -import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; -import com.google.privacy.dlp.v2.DateShiftConfig; -import com.google.privacy.dlp.v2.DeidentifyConfig; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.FieldId; -import com.google.privacy.dlp.v2.FieldTransformation; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InfoTypeTransformations; -import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; -import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RecordTransformations; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; -import com.google.privacy.dlp.v2.Table; -import com.google.privacy.dlp.v2.Value; -import com.google.protobuf.ByteString; -import com.google.type.Date; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.time.LocalDate; -import java.time.format.DateTimeParseException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class DeIdentification { - - // [START dlp_deidentify_replace_with_info_type] - /** - * Deidentify a string by replacing sensitive information with its info type using the DLP API. - * - * @param string The string to deidentify. - * @param projectId ID of Google Cloud project to run the API under. - */ - private static void deIdentifyReplaceWithInfoType( - String string, - List infoTypes, - String projectId) { - - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); - - // Create the deidentification transformation configuration - PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder() - .setReplaceWithInfoTypeConfig(ReplaceWithInfoTypeConfig.getDefaultInstance()) - .build(); - - InfoTypeTransformation infoTypeTransformationObject = - InfoTypeTransformation.newBuilder() - .setPrimitiveTransformation(primitiveTransformation) - .build(); - - InfoTypeTransformations infoTypeTransformationArray = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformationObject) - .build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); - - DeidentifyConfig deidentifyConfig = - DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(infoTypeTransformationArray) - .build(); - - // Create the deidentification request object - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectConfig(inspectConfig) - .setDeidentifyConfig(deidentifyConfig) - .setItem(contentItem) - .build(); - - // Execute the deidentification request - DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); - - // Print the redacted input value - // e.g. "My SSN is 123456789" --> "My SSN is [US_SOCIAL_SECURITY_NUMBER]" - String result = response.getItem().getValue(); - System.out.println(result); - } catch (Exception e) { - System.out.println("Error in deIdentifyReplaceWithInfoType: " + e.getMessage()); - } - } - // [END dlp_deidentify_replace_with_info_type] - - // [START dlp_deidentify_masking] - /** - * Deidentify a string by masking sensitive information with a character using the DLP API. - * - * @param string The string to deidentify. - * @param maskingCharacter (Optional) The character to mask sensitive data with. - * @param numberToMask (Optional) The number of characters' worth of sensitive data to mask. - * Omitting this value or setting it to 0 masks all sensitive chars. - * @param projectId ID of Google Cloud project to run the API under. - */ - private static void deIdentifyWithMask( - String string, - List infoTypes, - Character maskingCharacter, - int numberToMask, - String projectId) { - - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); - - CharacterMaskConfig characterMaskConfig = - CharacterMaskConfig.newBuilder() - .setMaskingCharacter(maskingCharacter.toString()) - .setNumberToMask(numberToMask) - .build(); - - // Create the deidentification transformation configuration - PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder().setCharacterMaskConfig(characterMaskConfig).build(); - - InfoTypeTransformation infoTypeTransformationObject = - InfoTypeTransformation.newBuilder() - .setPrimitiveTransformation(primitiveTransformation) - .build(); - - InfoTypeTransformations infoTypeTransformationArray = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformationObject) - .build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); - - DeidentifyConfig deidentifyConfig = - DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(infoTypeTransformationArray) - .build(); - - // Create the deidentification request object - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectConfig(inspectConfig) - .setDeidentifyConfig(deidentifyConfig) - .setItem(contentItem) - .build(); - - // Execute the deidentification request - DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); - - // Print the character-masked input value - // e.g. "My SSN is 123456789" --> "My SSN is *********" - String result = response.getItem().getValue(); - System.out.println(result); - } catch (Exception e) { - System.out.println("Error in deidentifyWithMask: " + e.getMessage()); - } - } - // [END dlp_deidentify_masking] - - // [START dlp_deidentify_fpe] - /** - * Deidentify a string by encrypting sensitive information while preserving format. - * - * @param string The string to deidentify. - * @param alphabet The set of characters to use when encrypting the input. For more information, - * see cloud.google.com/dlp/docs/reference/rest/v2/content/deidentify - * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. - * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. - * @param projectId ID of Google Cloud project to run the API under. - */ - private static void deIdentifyWithFpe( - String string, - List infoTypes, - FfxCommonNativeAlphabet alphabet, - String keyName, - String wrappedKey, - String projectId, - String surrogateType) { - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); - - // Create the format-preserving encryption (FPE) configuration - KmsWrappedCryptoKey kmsWrappedCryptoKey = - KmsWrappedCryptoKey.newBuilder() - .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) - .setCryptoKeyName(keyName) - .build(); - - CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); - - CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = - CryptoReplaceFfxFpeConfig.newBuilder() - .setCryptoKey(cryptoKey) - .setCommonAlphabet(alphabet) - .setSurrogateInfoType(InfoType.newBuilder().setName(surrogateType).build()) - .build(); - - // Create the deidentification transformation configuration - PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder() - .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) - .build(); - - InfoTypeTransformation infoTypeTransformationObject = - InfoTypeTransformation.newBuilder() - .setPrimitiveTransformation(primitiveTransformation) - .build(); - - InfoTypeTransformations infoTypeTransformationArray = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformationObject) - .build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); - - // Create the deidentification request object - DeidentifyConfig deidentifyConfig = - DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(infoTypeTransformationArray) - .build(); - - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectConfig(inspectConfig) - .setDeidentifyConfig(deidentifyConfig) - .setItem(contentItem) - .build(); - - // Execute the deidentification request - DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); - - // Print the deidentified input value - // e.g. "My SSN is 123456789" --> "My SSN is 7261298621" - String result = response.getItem().getValue(); - System.out.println(result); - } catch (Exception e) { - System.out.println("Error in deidentifyWithFpe: " + e.getMessage()); - } - } - // [END dlp_deidentify_fpe] - - // [START dlp_reidentify_fpe] - /** - * Reidentify a string by encrypting sensitive information while preserving format. - * - * @param string The string to reidentify. - * @param alphabet The set of characters used when encrypting the input. For more information, see - * cloud.google.com/dlp/docs/reference/rest/v2/content/deidentify - * @param keyName The name of the Cloud KMS key to use when decrypting the wrapped key. - * @param wrappedKey The encrypted (or "wrapped") AES-256 encryption key. - * @param projectId ID of Google Cloud project to run the API under. - * @param surrogateType The name of the surrogate custom info type to used during the encryption - * process. - */ - private static void reIdentifyWithFpe( - String string, - FfxCommonNativeAlphabet alphabet, - String keyName, - String wrappedKey, - String projectId, - String surrogateType) { - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - ContentItem contentItem = ContentItem.newBuilder().setValue(string).build(); - - InfoType surrogateTypeObject = InfoType.newBuilder().setName(surrogateType).build(); - - // Create the format-preserving encryption (FPE) configuration - KmsWrappedCryptoKey kmsWrappedCryptoKey = - KmsWrappedCryptoKey.newBuilder() - .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) - .setCryptoKeyName(keyName) - .build(); - - CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); - - CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = - CryptoReplaceFfxFpeConfig.newBuilder() - .setCryptoKey(cryptoKey) - .setCommonAlphabet(alphabet) - .setSurrogateInfoType(surrogateTypeObject) - .build(); - - // Create the deidentification transformation configuration - PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder() - .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) - .build(); - - InfoTypeTransformation infoTypeTransformationObject = - InfoTypeTransformation.newBuilder() - .setPrimitiveTransformation(primitiveTransformation) - .addInfoTypes(surrogateTypeObject) - .build(); - - InfoTypeTransformations infoTypeTransformationArray = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformationObject) - .build(); - - // Create the inspection config - CustomInfoType customInfoType = - CustomInfoType.newBuilder() - .setInfoType(surrogateTypeObject) - .setSurrogateType(SurrogateType.newBuilder().build()) - .build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder().addCustomInfoTypes(customInfoType).build(); - - // Create the reidentification request object - DeidentifyConfig reidentifyConfig = - DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(infoTypeTransformationArray) - .build(); - - ReidentifyContentRequest request = - ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setReidentifyConfig(reidentifyConfig) - .setInspectConfig(inspectConfig) - .setItem(contentItem) - .build(); - - // Execute the deidentification request - ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request); - - // Print the reidentified input value - // e.g. "My SSN is 7261298621" --> "My SSN is 123456789" - String result = response.getItem().getValue(); - System.out.println(result); - } catch (Exception e) { - System.out.println("Error in reidentifyWithFpe: " + e.getMessage()); - } - } - // [END dlp_reidentify_fpe] - - // [START dlp_deidentify_date_shift] - /** - * @param inputCsvPath The path to the CSV file to deidentify - * @param outputCsvPath (Optional) path to the output CSV file - * @param dateFields The list of (date) fields in the CSV file to date shift - * @param lowerBoundDays The maximum number of days to shift a date backward - * @param upperBoundDays The maximum number of days to shift a date forward - * @param contextFieldId (Optional) The column to determine date shift, default : a random shift - * amount - * @param wrappedKey (Optional) The encrypted ('wrapped') AES-256 key to use when shifting dates - * @param keyName (Optional) The name of the Cloud KMS key used to encrypt ('wrap') the AES-256 - * key - * @param projectId ID of Google Cloud project to run the API under. - */ - private static void deidentifyWithDateShift( - Path inputCsvPath, - Path outputCsvPath, - String[] dateFields, - int lowerBoundDays, - int upperBoundDays, - String contextFieldId, - String wrappedKey, - String keyName, - String projectId) - throws Exception { - // instantiate a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // Set the maximum days to shift a day backward (lowerbound), forward (upperbound) - DateShiftConfig.Builder dateShiftConfigBuilder = - DateShiftConfig.newBuilder() - .setLowerBoundDays(lowerBoundDays) - .setUpperBoundDays(upperBoundDays); - - // If contextFieldId, keyName or wrappedKey is set: all three arguments must be valid - if (contextFieldId != null && keyName != null && wrappedKey != null) { - dateShiftConfigBuilder.setContext(FieldId.newBuilder().setName(contextFieldId).build()); - KmsWrappedCryptoKey kmsWrappedCryptoKey = - KmsWrappedCryptoKey.newBuilder() - .setCryptoKeyName(keyName) - .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedKey))) - .build(); - dateShiftConfigBuilder.setCryptoKey( - CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build()); - - } else if (contextFieldId != null || keyName != null || wrappedKey != null) { - throw new IllegalArgumentException( - "You must set either ALL or NONE of {contextFieldId, keyName, wrappedKey}!"); - } - - // Read and parse the CSV file - BufferedReader br = null; - String line; - List rows = new ArrayList<>(); - List headers; - - br = new BufferedReader(new FileReader(inputCsvPath.toFile())); - - // convert csv header to FieldId - headers = - Arrays.stream(br.readLine().split(",")) - .map(header -> FieldId.newBuilder().setName(header).build()) - .collect(Collectors.toList()); - - while ((line = br.readLine()) != null) { - // convert csv rows to Table.Row - rows.add(convertCsvRowToTableRow(line)); - } - br.close(); - - Table table = Table.newBuilder().addAllHeaders(headers).addAllRows(rows).build(); - - List dateFieldIds = - Arrays.stream(dateFields) - .map(field -> FieldId.newBuilder().setName(field).build()) - .collect(Collectors.toList()); - - DateShiftConfig dateShiftConfig = dateShiftConfigBuilder.build(); - - FieldTransformation fieldTransformation = - FieldTransformation.newBuilder() - .addAllFields(dateFieldIds) - .setPrimitiveTransformation( - PrimitiveTransformation.newBuilder().setDateShiftConfig(dateShiftConfig).build()) - .build(); - - DeidentifyConfig deidentifyConfig = - DeidentifyConfig.newBuilder() - .setRecordTransformations( - RecordTransformations.newBuilder() - .addFieldTransformations(fieldTransformation) - .build()) - .build(); - - ContentItem tableItem = ContentItem.newBuilder().setTable(table).build(); - - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setDeidentifyConfig(deidentifyConfig) - .setItem(tableItem) - .build(); - - // Execute the deidentification request - DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request); - - // Write out the response as a CSV file - List outputHeaderFields = response.getItem().getTable().getHeadersList(); - List outputRows = response.getItem().getTable().getRowsList(); - - List outputHeaders = - outputHeaderFields.stream().map(FieldId::getName).collect(Collectors.toList()); - - File outputFile = outputCsvPath.toFile(); - if (!outputFile.exists()) { - outputFile.createNewFile(); - } - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); - - // write out headers - bufferedWriter.append(String.join(",", outputHeaders) + "\n"); - - // write out each row - for (Table.Row outputRow : outputRows) { - String row = - outputRow - .getValuesList() - .stream() - .map(value -> value.getStringValue()) - .collect(Collectors.joining(",")); - bufferedWriter.append(row + "\n"); - } - - bufferedWriter.flush(); - bufferedWriter.close(); - - System.out.println("Successfully saved date-shift output to: " + outputCsvPath.getFileName()); - } catch (Exception e) { - System.out.println("Error in deidentifyWithDateShift: " + e.getMessage()); - } - } - - // Parse string to valid date, return null when invalid - private static LocalDate getValidDate(String dateString) { - try { - return LocalDate.parse(dateString); - } catch (DateTimeParseException e) { - return null; - } - } - - // convert CSV row into Table.Row - private static Table.Row convertCsvRowToTableRow(String row) { - String[] values = row.split(","); - Table.Row.Builder tableRowBuilder = Table.Row.newBuilder(); - for (String value : values) { - LocalDate date = getValidDate(value); - if (date != null) { - // convert to com.google.type.Date - Date dateValue = - Date.newBuilder() - .setYear(date.getYear()) - .setMonth(date.getMonthValue()) - .setDay(date.getDayOfMonth()) - .build(); - Value tableValue = Value.newBuilder().setDateValue(dateValue).build(); - tableRowBuilder.addValues(tableValue); - } else { - tableRowBuilder.addValues(Value.newBuilder().setStringValue(value).build()); - } - } - return tableRowBuilder.build(); - } - // [END dlp_deidentify_date_shift] - - /** - * Command line application to de-identify data using the Data Loss Prevention API. Supported data - * format: strings - */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - - Option deidentifyReplaceWithInfoTypeOption = - new Option("it", "info_type_replace", true, "Deidentify by replacing with info type."); - optionsGroup.addOption(deidentifyReplaceWithInfoTypeOption); - - Option deidentifyMaskingOption = - new Option("m", "mask", true, "Deidentify with character masking."); - optionsGroup.addOption(deidentifyMaskingOption); - - Option deidentifyFpeOption = - new Option("f", "fpe", true, "Deidentify with format-preserving encryption."); - optionsGroup.addOption(deidentifyFpeOption); - - Option reidentifyFpeOption = - new Option("r", "reid", true, "Reidentify with format-preserving encryption."); - optionsGroup.addOption(reidentifyFpeOption); - - Option deidentifyDateShiftOption = - new Option("d", "date", false, "Deidentify dates in a CSV file."); - optionsGroup.addOption(deidentifyDateShiftOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - Option maskingCharacterOption = - Option.builder("maskingCharacter").hasArg(true).required(false).build(); - commandLineOptions.addOption(maskingCharacterOption); - - Option surrogateTypeOption = - Option.builder("surrogateType").hasArg(true).required(false).build(); - commandLineOptions.addOption(surrogateTypeOption); - - Option numberToMaskOption = Option.builder("numberToMask").hasArg(true).required(false).build(); - commandLineOptions.addOption(numberToMaskOption); - - Option alphabetOption = Option.builder("commonAlphabet").hasArg(true).required(false).build(); - commandLineOptions.addOption(alphabetOption); - - Option wrappedKeyOption = Option.builder("wrappedKey").hasArg(true).required(false).build(); - commandLineOptions.addOption(wrappedKeyOption); - - Option keyNameOption = Option.builder("keyName").hasArg(true).required(false).build(); - commandLineOptions.addOption(keyNameOption); - - Option inputCsvPathOption = Option.builder("inputCsvPath").hasArg(true).required(false).build(); - commandLineOptions.addOption(inputCsvPathOption); - - Option outputCsvPathOption = - Option.builder("outputCsvPath").hasArg(true).required(false).build(); - commandLineOptions.addOption(outputCsvPathOption); - - Option dateFieldsOption = Option.builder("dateFields").hasArg(true).required(false).build(); - commandLineOptions.addOption(dateFieldsOption); - - Option lowerBoundDaysOption = - Option.builder("lowerBoundDays").hasArg(true).required(false).build(); - commandLineOptions.addOption(lowerBoundDaysOption); - - Option upperBoundDaysOption = - Option.builder("upperBoundDays").hasArg(true).required(false).build(); - commandLineOptions.addOption(upperBoundDaysOption); - - Option contextFieldNameOption = - Option.builder("contextField").hasArg(true).required(false).build(); - commandLineOptions.addOption(contextFieldNameOption); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(DeIdentification.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - // default to auto-detected project id when not explicitly provided - String projectId = - cmd.getOptionValue(projectIdOption.getOpt()); - - List infoTypesList = Collections.emptyList(); - if (cmd.hasOption(infoTypesOption.getOpt())) { - infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - - if (cmd.hasOption("it")) { - // replace with info type - String val = cmd.getOptionValue(deidentifyReplaceWithInfoTypeOption.getOpt()); - deIdentifyReplaceWithInfoType(val, infoTypesList, projectId); - } else if (cmd.hasOption("m")) { - // deidentification with character masking - int numberToMask = Integer.parseInt(cmd.getOptionValue(numberToMaskOption.getOpt(), "0")); - char maskingCharacter = cmd.getOptionValue(maskingCharacterOption.getOpt(), "*").charAt(0); - String val = cmd.getOptionValue(deidentifyMaskingOption.getOpt()); - deIdentifyWithMask(val, infoTypesList, maskingCharacter, numberToMask, projectId); - } else if (cmd.hasOption("f")) { - // deidentification with FPE - String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); - String keyName = cmd.getOptionValue(keyNameOption.getOpt()); - String val = cmd.getOptionValue(deidentifyFpeOption.getOpt()); - String surrogateType = cmd.getOptionValue(surrogateTypeOption.getOpt()); - FfxCommonNativeAlphabet alphabet = - FfxCommonNativeAlphabet.valueOf( - cmd.getOptionValue( - alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); - deIdentifyWithFpe( - val, infoTypesList, alphabet, keyName, wrappedKey, projectId, surrogateType); - } else if (cmd.hasOption("d")) { - //deidentify with date shift - String inputCsv = cmd.getOptionValue(inputCsvPathOption.getOpt()); - String outputCsv = cmd.getOptionValue(outputCsvPathOption.getOpt()); - - String contextField = cmd.getOptionValue(contextFieldNameOption.getOpt(), null); - String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt(), null); - String keyName = cmd.getOptionValue(keyNameOption.getOpt(), null); - - String[] dateFields = cmd.getOptionValue(dateFieldsOption.getOpt(), "").split(","); - - int lowerBoundsDay = Integer.valueOf(cmd.getOptionValue(lowerBoundDaysOption.getOpt())); - int upperBoundsDay = Integer.valueOf(cmd.getOptionValue(upperBoundDaysOption.getOpt())); - - deidentifyWithDateShift( - Paths.get(inputCsv), - Paths.get(outputCsv), - dateFields, - lowerBoundsDay, - upperBoundsDay, - contextField, - wrappedKey, - keyName, - projectId); - } else if (cmd.hasOption("r")) { - // reidentification with FPE - String wrappedKey = cmd.getOptionValue(wrappedKeyOption.getOpt()); - String keyName = cmd.getOptionValue(keyNameOption.getOpt()); - String val = cmd.getOptionValue(reidentifyFpeOption.getOpt()); - String surrogateType = cmd.getOptionValue(surrogateTypeOption.getOpt()); - FfxCommonNativeAlphabet alphabet = - FfxCommonNativeAlphabet.valueOf( - cmd.getOptionValue( - alphabetOption.getOpt(), FfxCommonNativeAlphabet.ALPHA_NUMERIC.name())); - reIdentifyWithFpe(val, alphabet, keyName, wrappedKey, projectId, surrogateType); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java index 16b1634232e..234ead4c703 100644 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java +++ b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java @@ -261,7 +261,7 @@ public static void main(String[] args) throws Exception { cmd = parser.parse(commandLineOptions, args); } catch (ParseException e) { System.out.println(e.getMessage()); - formatter.printHelp(DeIdentification.class.getName(), commandLineOptions); + formatter.printHelp(Triggers.class.getName(), commandLineOptions); System.exit(1); return; } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java new file mode 100644 index 00000000000..c9a93e6331c --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java @@ -0,0 +1,151 @@ +package dlp.snippets; + +// [START dlp_deidentify_date_shift] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.base.Splitter; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DateShiftConfig; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Value; +import com.google.type.Date; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +public class DeIdentifyWithDateShift { + + public static void deIdentifyWithDateShift() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "YOUR_PROJECT_ID"; + Path inputCsvFile = Paths.get("path/to/your/input/file.csv"); + Path outputCsvFile = Paths.get("path/to/your/output/file.csv"); + deIdentifyWithDateShift(projectId, inputCsvFile, outputCsvFile); + } + + public static void deIdentifyWithDateShift( + String projectId, Path inputCsvFile, Path outputCsvFile) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Read the contents of the CSV file into a Table + List headers; + List rows; + try (BufferedReader input = Files.newBufferedReader(inputCsvFile)) { + // Parse and convert the first line into header names + headers = + Arrays.stream(input.readLine().split(",")) + .map(header -> FieldId.newBuilder().setName(header).build()) + .collect(Collectors.toList()); + // Parse the remainder of the file as Table.Rows + rows = + input.lines().map(DeIdentifyWithDateShift::parseLineAsRow).collect(Collectors.toList()); + } + Table table = Table.newBuilder().addAllHeaders(headers).addAllRows(rows).build(); + ContentItem item = ContentItem.newBuilder().setTable(table).build(); + + // Set the maximum days to shift dates backwards (lower bound) or forward (upper bound) + DateShiftConfig dateShiftConfig = + DateShiftConfig.newBuilder().setLowerBoundDays(5).setUpperBoundDays(5).build(); + PrimitiveTransformation transformation = + PrimitiveTransformation.newBuilder().setDateShiftConfig(dateShiftConfig).build(); + // Specify which fields the DateShift should apply too + List dateFields = Arrays.asList(headers.get(1), headers.get(3)); + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .addAllFields(dateFields) + .setPrimitiveTransformation(transformation) + .build(); + RecordTransformations recordTransformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + // Specify the config for the de-identify request + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(recordTransformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(item) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Write the results to the target CSV file + try (BufferedWriter writer = Files.newBufferedWriter(outputCsvFile)) { + Table outTable = response.getItem().getTable(); + String headerOut = + outTable.getHeadersList().stream() + .map(FieldId::getName) + .collect(Collectors.joining(",")); + writer.write(headerOut + "\n"); + + List rowOutput = + outTable.getRowsList().stream() + .map(row -> joinRow(row.getValuesList())) + .collect(Collectors.toList()); + for (String line : rowOutput) { + writer.write(line + "\n"); + } + System.out.println("Content written to file: " + outputCsvFile.toString()); + } + } + } + + // Convert the string from the csv file into com.google.type.Date + public static Date parseAsDate(String s) { + LocalDate date = LocalDate.parse(s, DateTimeFormatter.ofPattern("MM/dd/yyyy")); + return Date.newBuilder() + .setDay(date.getDayOfMonth()) + .setMonth(date.getMonthValue()) + .setYear(date.getYear()) + .build(); + } + + // Each row is in the format: Name,BirthDate,CreditCardNumber,RegisterDate + public static Table.Row parseLineAsRow(String line) { + List values = Splitter.on(",").splitToList(line); + Value name = Value.newBuilder().setStringValue(values.get(0)).build(); + Value birthDate = Value.newBuilder().setDateValue(parseAsDate(values.get(1))).build(); + Value creditCardNumber = Value.newBuilder().setStringValue(values.get(2)).build(); + Value registerDate = Value.newBuilder().setDateValue(parseAsDate(values.get(3))).build(); + return Table.Row.newBuilder() + .addValues(name) + .addValues(birthDate) + .addValues(creditCardNumber) + .addValues(registerDate) + .build(); + } + + public static String formatDate(Date d) { + return String.format("%s/%s/%s", d.getMonth(), d.getDay(), d.getYear()); + } + + public static String joinRow(List values) { + String name = values.get(0).getStringValue(); + String birthDate = formatDate(values.get(1).getDateValue()); + String creditCardNumber = values.get(2).getStringValue(); + String registerDate = formatDate(values.get(3).getDateValue()); + return String.join(",", name, birthDate, creditCardNumber, registerDate); + } +} +// [END dlp_deidentify_date_shift] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java new file mode 100644 index 00000000000..f01bbeb69dd --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java @@ -0,0 +1,106 @@ +package dlp.snippets; + +// [START dlp_deidentify_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.util.Arrays; + +public class DeIdentifyWithFpe { + + public static void deIdentifyWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "YOUR_PROJECT_ID"; + String textToDeIdentify = "I'm Gary and my email is gary@example.com"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + deIdentifyWithFpe(projectId, textToDeIdentify, kmsKeyName, wrappedAesKey); + } + + public static void deIdentifyWithFpe( + String projectId, String textToDeIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to DeIdentify + ContentItem contentItem = ContentItem.newBuilder().setValue(textToDeIdentify).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("US_SOCIAL_SECURITY_NUMBER").build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(Arrays.asList(infoType)).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how the info from the inspection should be encrypted. + InfoType surrogateInfoType = InfoType.newBuilder().setName("SSN_TOKEN").build(); + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .setSurrogateInfoType(surrogateInfoType) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + InfoTypeTransformations transformations = + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setInfoTypeTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results + System.out.println( + "Text after format-preserving encryption: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java new file mode 100644 index 00000000000..dc0d1c57546 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java @@ -0,0 +1,83 @@ +package dlp.snippets; + +// [START dlp_deidentify_masking] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CharacterMaskConfig; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import java.io.IOException; +import java.util.Arrays; + +public class DeIdentifyWithMasking { + + public static void deIdentifyWithMasking() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToDeIdentify = "My SSN is 372819127"; + deIdentifyWithMasking(projectId, textToDeIdentify); + } + + public static void deIdentifyWithMasking(String projectId, String textToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + + // Specify what content you want the service to DeIdentify + ContentItem contentItem = ContentItem.newBuilder().setValue(textToDeIdentify).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("US_SOCIAL_SECURITY_NUMBER").build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(Arrays.asList(infoType)).build(); + + // Specify how the info from the inspection should be masked. + CharacterMaskConfig characterMaskConfig = + CharacterMaskConfig.newBuilder() + .setMaskingCharacter("X") // Character to replace the found info with + .setNumberToMask(5) // How many characters should be masked + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(ReplaceWithInfoTypeConfig.getDefaultInstance()) + .build(); + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + InfoTypeTransformations transformations = + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setInfoTypeTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results + System.out.println("Text after masking: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_masking] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index 40fa071ea4e..951be74e270 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -16,7 +16,7 @@ package dlp.snippets; -// [START dlp_inspect_gcs] +// [START dlp_inspect_bigquery] import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.AckReplyConsumer; @@ -162,4 +162,4 @@ public static void inspectBigQueryTable( } } } -// [END dlp_inspect_gcs] +// [END dlp_inspect_bigquery] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java new file mode 100644 index 00000000000..245a7d5f56e --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java @@ -0,0 +1,112 @@ +package dlp.snippets; + +// [START dlp_reidentify_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class ReIdentifyWithFpe { + + public static void reIdentifyWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "YOUR_PROJECT_ID"; + String textToReIdentify = "My SSN is SSN_TOKEN(9):731997681"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + reIdentifyWithFpe(projectId, textToReIdentify, kmsKeyName, wrappedAesKey); + } + + public static void reIdentifyWithFpe( + String projectId, String textToReIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to re-identify + ContentItem contentItem = ContentItem.newBuilder().setValue(textToReIdentify).build(); + + // Specify the type of info the inspection will re-identify. This must use the same custom + // into type that was used as a surrogate during the initial encryption. + InfoType surrogateInfoType = InfoType.newBuilder().setName("SSN_TOKEN").build(); + + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(surrogateInfoType) + .setSurrogateType(SurrogateType.getDefaultInstance()) + .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addCustomInfoTypes(customInfoType).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how to un-encrypt the previously de-identified information + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .setSurrogateInfoType(surrogateInfoType) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addInfoTypes(surrogateInfoType) + .build(); + InfoTypeTransformations transformations = + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); + + DeidentifyConfig reidentifyConfig = + DeidentifyConfig.newBuilder().setInfoTypeTransformations(transformations).build(); + + // Combine configurations into a request for the service. + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setReidentifyConfig(reidentifyConfig) + .build(); + + // Send the request and receive response from the service + ReidentifyContentResponse response = dlp.reidentifyContent(request); + + // Print the results + System.out.println("Text after re-identification: " + response.getItem().getValue()); + } + } +} +// [END dlp_reidentify_fpe] diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java deleted file mode 100644 index 26965022789..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/DeIdentificationIT.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Arrays; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class DeIdentificationIT { - - // CHECKSTYLE ON: AbbreviationAsWordInName - private ByteArrayOutputStream bout; - private PrintStream out; - - // Update to wrapped local encryption key - private String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); - - // Update to name of KMS key used to wrap local encryption key - private String keyName = System.getenv("DLP_DEID_KEY_NAME"); - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); - assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); - } - - @Test - public void testDeidReplaceWithInfoType() throws Exception { - String text = "\"My SSN is 372819127\""; - DeIdentification.main( - new String[] { - "-it", text, - "-infoTypes", "US_SOCIAL_SECURITY_NUMBER" - }); - String output = bout.toString(); - assertThat(output, containsString("My SSN is [US_SOCIAL_SECURITY_NUMBER]")); - } - - @Test - public void testDeidStringMasksCharacters() throws Exception { - String text = "\"My SSN is 372819127\""; - DeIdentification.main( - new String[] { - "-m", text, - "-infoTypes", "US_SOCIAL_SECURITY_NUMBER", - "-maskingCharacter", "x", - "-numberToMask", "5" - }); - String output = bout.toString(); - assertThat(output, containsString("My SSN is xxxxx9127")); - } - - @Test - public void testDeidReidFpe() throws Exception { - - // Test DeID - String text = "My SSN is 372819127"; - DeIdentification.main( - new String[] { - "-f", - "\"" + text + "\"", - "-infoTypes", - "US_SOCIAL_SECURITY_NUMBER", - "-wrappedKey", - wrappedKey, - "-keyName", - keyName, - "-commonAlphabet", - "NUMERIC", - "-surrogateType", - "SSN_TOKEN" - }); - String deidOutput = bout.toString(); - assertFalse("Response contains original SSN.", deidOutput.contains("372819127")); - assertTrue(deidOutput.matches("My SSN is SSN_TOKEN\\(9\\):\\d+\n")); - - // Test ReID - bout.flush(); - DeIdentification.main( - new String[] { - "-r", - deidOutput.toString().trim(), - "-wrappedKey", - wrappedKey, - "-keyName", - keyName, - "-commonAlphabet", - "NUMERIC", - "-surrogateType", - "SSN_TOKEN" - }); - String reidOutput = bout.toString(); - assertThat(reidOutput, containsString(text)); - } - - @Test - public void testDeidentifyWithDateShift() throws Exception { - String outputPath = "src/test/resources/results.temp.csv"; - DeIdentification.main( - new String[] { - "-d", - "-inputCsvPath", - "src/test/resources/dates.csv", - "-outputCsvPath", - outputPath, - "-dateFields", - "birth_date,register_date", - "-lowerBoundDays", - "5", - "-upperBoundDays", - "5", - "-contextField", - "name", - "-wrappedKey", - wrappedKey, - "-keyName", - keyName - }); - String output = bout.toString(); - assertThat(output, containsString("Successfully saved date-shift output to: results.temp.csv")); - - // Compare the result against an expected output file - byte[] resultCsv = Files.readAllBytes(Paths.get(outputPath)); - byte[] correctCsv = Files.readAllBytes(Paths.get("src/test/resources/results.correct.csv")); - - assertTrue(Arrays.equals(resultCsv, correctCsv)); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java new file mode 100644 index 00000000000..1031d827a94 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -0,0 +1,109 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertNotNull; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class DeIdentificationTests { + + private ByteArrayOutputStream bout; + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + // TODO: Update as ENV_VARs + private static final String bucketName = PROJECT_ID + "/dlp"; + + private String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); + private String kmsKeyName = System.getenv("DLP_DEID_KEY_NAME"); + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @Before + public void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("DLP_DEID_WRAPPED_KEY"); + requireEnvVar("DLP_DEID_KEY_NAME"); + } + + @Before + public void captureOut() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void releaseOut() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testDeIdentifyWithMasking() throws IOException { + DeIdentifyWithMasking.deIdentifyWithMasking(PROJECT_ID, "My SSN is 372819127"); + + String output = bout.toString(); + assertThat(output, containsString("Text after masking:")); + } + + @Test + public void testDeIdentifyWithFpe() throws IOException { + DeIdentifyWithFpe.deIdentifyWithFpe(PROJECT_ID, "My SSN is 372819127", kmsKeyName, wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Text after format-preserving encryption:")); + } + + @Test + public void testReIdentifyWithFpe() throws IOException { + ReIdentifyWithFpe.reIdentifyWithFpe(PROJECT_ID, "My SSN is SSN_TOKEN(9):731997681", kmsKeyName, wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Text after re-identification:")); + } + + @Test + public void testDeIdentifyWithDateShift() throws IOException { + Path inputFile = Paths.get("src/test/resources/dates.csv"); + assertThat("Input file must exist", inputFile.toFile().exists()); + Path outputFile = Paths.get("src/test/resources/results.csv"); + assertThat("Output file must be writeable", inputFile.toFile().canWrite()); + DeIdentifyWithDateShift.deIdentifyWithDateShift(PROJECT_ID, inputFile, outputFile); + + String output = bout.toString(); + assertThat(output, containsString("Content written to file: ")); + } + +} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index ff5cc779c58..5d403dd90a0 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -55,7 +55,7 @@ private static void requireEnvVar(String varName) { @Before public void checkRequirements() { - // requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("GOOGLE_CLOUD_PROJECT"); } From 39ade38f88ad475a079654f9ca9eea4c41fc93f2 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Tue, 11 Feb 2020 12:46:53 -0800 Subject: [PATCH 052/406] samples: Cleanup DLP Metadata and Jobs snippets (#2054) * refactored Metadata.java and corresponding tests to snippet format * Refactored Jobs.java into snippets and updated integration tests * removed unnecessary imports * added step to create job in JobTests.java * Update dlp/src/main/java/dlp/snippets/InspectTextFile.java Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> * Update dlp/src/main/java/dlp/snippets/InfoTypesList.java Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> * Update dlp/src/main/java/dlp/snippets/InfoTypesList.java Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> * Update dlp/src/main/java/dlp/snippets/InspectGcsFile.java Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> * minor refactoring and fixups * added @BeforeClass annotation to checkRequirements * updated documentation * removed GCS_PATH env variable * updated jobs tests * updated imports Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> --- .../src/main/java/com/example/dlp/Jobs.java | 146 ------------------ .../main/java/com/example/dlp/Metadata.java | 82 ---------- .../dlp/snippets/DeIdentifyWithDateShift.java | 2 +- .../java/dlp/snippets/DeIdentifyWithFpe.java | 2 +- .../main/java/dlp/snippets/InfoTypesList.java | 59 +++++++ .../java/dlp/snippets/InspectGcsFile.java | 2 +- .../java/dlp/snippets/InspectImageFile.java | 2 +- .../main/java/dlp/snippets/InspectString.java | 2 +- .../java/dlp/snippets/InspectTextFile.java | 4 +- .../main/java/dlp/snippets/JobsDelete.java | 55 +++++++ .../src/main/java/dlp/snippets/JobsList.java | 65 ++++++++ .../java/dlp/snippets/ReIdentifyWithFpe.java | 2 +- .../java/dlp/snippets/RedactImageFile.java | 2 +- .../src/test/java/com/example/dlp/JobsIT.java | 85 ---------- .../test/java/com/example/dlp/MetadataIT.java | 62 -------- .../dlp/snippets/DeIdentificationTests.java | 21 ++- .../java/dlp/snippets/InfoTypesTests.java | 68 ++++++++ .../src/test/java/dlp/snippets/JobsTests.java | 136 ++++++++++++++++ .../test/java/dlp/snippets/RedactTests.java | 24 ++- 19 files changed, 423 insertions(+), 398 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java deleted file mode 100644 index 51195ee94ba..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Jobs.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpJobName; -import com.google.privacy.dlp.v2.DlpJobType; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ProjectName; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Jobs { - - // [START dlp_list_jobs] - /* - * List DLP jobs - * - * @param projectId The project ID to run the API call under - * @param filter The filter expression to use, eg. state=DONE For more information on filter - * syntax see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list - * @param jobType The type of job to list (either 'INSPECT_JOB' or 'RISK_ANALYSIS_JOB') - */ - private static void listJobs(String projectId, String filter, DlpJobType jobType) - throws Exception { - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - ListDlpJobsRequest listDlpJobsRequest = - ListDlpJobsRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setFilter(filter) - .setType(jobType) - .build(); - DlpServiceClient.ListDlpJobsPagedResponse response = - dlpServiceClient.listDlpJobs(listDlpJobsRequest); - for (DlpJob dlpJob : response.getPage().getValues()) { - System.out.println(dlpJob.getName() + " -- " + dlpJob.getState()); - } - } - } - // [END dlp_list_jobs] - - /** - * Delete a DLP Job - * - * @param projectId Google Cloud ProjectID - * @param jobId DLP Job ID - */ - // [START dlp_delete_job] - private static void deleteJob(String projectId, String jobId) { - - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // construct complete job name - DlpJobName job = DlpJobName.of(projectId, jobId); - - DeleteDlpJobRequest deleteDlpJobRequest = - DeleteDlpJobRequest.newBuilder().setName(job.toString()).build(); - - // submit job deletion request - dlpServiceClient.deleteDlpJob(deleteDlpJobRequest); - - System.out.println("Job deleted successfully."); - } catch (Exception e) { - System.err.println("Error deleting DLP job: " + e.getMessage()); - } - } - // [END dlp_delete_job] - - /** Command line application to list and delete DLP jobs the Data Loss Prevention API. */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - Option listOption = new Option("l", "list", false, "List DLP Jobs"); - optionsGroup.addOption(listOption); - - Option deleteOption = new Option("d", "delete", false, "Delete DLP Jobs"); - optionsGroup.addOption(deleteOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - Option filterOption = Option.builder("filter").hasArg(true).required(false).build(); - commandLineOptions.addOption(filterOption); - - Option jobTypeOption = Option.builder("jobType").hasArg(true).required(false).build(); - commandLineOptions.addOption(jobTypeOption); - - Option jobIdOption = Option.builder("jobId").hasArg(true).required(false).build(); - commandLineOptions.addOption(jobIdOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(Jobs.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - String projectId = - cmd.getOptionValue(projectIdOption.getOpt()); - - if (cmd.hasOption(listOption.getOpt())) { - String filter = cmd.getOptionValue(filterOption.getOpt(), ""); - DlpJobType jobType = - DlpJobType.valueOf( - cmd.getOptionValue( - jobTypeOption.getOpt(), DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.name())); - listJobs(projectId, filter, jobType); - } - - if (cmd.hasOption(deleteOption.getOpt())) { - String jobId = cmd.getOptionValue(jobIdOption.getOpt()); - deleteJob(projectId, jobId); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java deleted file mode 100644 index 3b7a85aec5b..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Metadata.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.InfoTypeDescription; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import java.util.List; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Metadata { - - // [START dlp_list_info_types] - /* - * List the types of sensitive information the DLP API supports. - * - * @param filter The filter to use, e.g. "supported_by=INSPECT" - * @param languageCode The BCP-47 language code to use, e.g. 'en-US' - */ - private static void listInfoTypes(String filter, String languageCode) throws Exception { - - // Instantiate a DLP client - try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - ListInfoTypesRequest listInfoTypesRequest = - ListInfoTypesRequest.newBuilder().setFilter(filter).setLanguageCode(languageCode).build(); - ListInfoTypesResponse infoTypesResponse = dlpClient.listInfoTypes(listInfoTypesRequest); - List infoTypeDescriptions = infoTypesResponse.getInfoTypesList(); - for (InfoTypeDescription infoTypeDescription : infoTypeDescriptions) { - System.out.println("Name : " + infoTypeDescription.getName()); - System.out.println("Display name : " + infoTypeDescription.getDisplayName()); - } - } - } - // [END dlp_list_info_types] - - /** Retrieve infoTypes. */ - public static void main(String[] args) throws Exception { - Options options = new Options(); - Option languageCodeOption = Option.builder("language").hasArg(true).required(false).build(); - options.addOption(languageCodeOption); - - Option filterOption = Option.builder("filter").hasArg(true).required(false).build(); - options.addOption(filterOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - try { - cmd = parser.parse(options, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(Metadata.class.getName(), options); - System.exit(1); - return; - } - String languageCode = cmd.getOptionValue(languageCodeOption.getOpt(), "en-US"); - String filter = cmd.getOptionValue(filterOption.getOpt(), ""); - - listInfoTypes(filter, languageCode); - } -} diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java index c9a93e6331c..e243d01e1fd 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java @@ -33,7 +33,7 @@ public class DeIdentifyWithDateShift { public static void deIdentifyWithDateShift() throws IOException { // TODO(developer): Replace these variables before running the sample. - String projectId = "YOUR_PROJECT_ID"; + String projectId = "your-project-id"; Path inputCsvFile = Paths.get("path/to/your/input/file.csv"); Path outputCsvFile = Paths.get("path/to/your/output/file.csv"); deIdentifyWithDateShift(projectId, inputCsvFile, outputCsvFile); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java index f01bbeb69dd..6d8146c5b77 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java @@ -26,7 +26,7 @@ public class DeIdentifyWithFpe { public static void deIdentifyWithFpe() throws IOException { // TODO(developer): Replace these variables before running the sample. - String projectId = "YOUR_PROJECT_ID"; + String projectId = "your-project-id"; String textToDeIdentify = "I'm Gary and my email is gary@example.com"; String kmsKeyName = "projects/YOUR_PROJECT/" diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java new file mode 100644 index 00000000000..8a0712328ac --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_list_info_types] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.InfoTypeDescription; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; + +import java.io.IOException; +import java.util.List; + +public class InfoTypesList { + + // Lists the types of sensitive information the DLP API supports. + public static void listInfoTypes() throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + + // Construct the request to be sent by the client + ListInfoTypesRequest listInfoTypesRequest = ListInfoTypesRequest.newBuilder() + // Only return infoTypes supported by certain parts of the API. + // Supported filters are "supported_by=INSPECT" and "supported_by=RISK_ANALYSIS" + // Defaults to "supported_by=INSPECT" + .setFilter("supported_by=INSPECT") + // BCP-47 language code for localized infoType friendly names. + // Defaults to "en_US" + .setLanguageCode("en-US").build(); + + // Use the client to send the API request. + ListInfoTypesResponse response = dlpClient.listInfoTypes(listInfoTypesRequest); + + // Parse the response and process the results + System.out.println("Infotypes found:"); + for (InfoTypeDescription infoTypeDescription : response.getInfoTypesList()) { + System.out.println("Name : " + infoTypeDescription.getName()); + System.out.println("Display name : " + infoTypeDescription.getDisplayName()); + } + } + } +} +// [END dlp_list_info_types] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index e1cfd49f9bf..1d3d6d571ee 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -51,7 +51,7 @@ public class InspectGcsFile { public static void inspectGcsFile() throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/image.png"; + String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/file.txt"; String pubSubTopicId = "your-pubsub-topic-id"; String pubSubSubscriptionId = "your-pubsub-subscription-id"; inspectGcsFile(projectId, gcsUri, pubSubTopicId, pubSubSubscriptionId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index b8e6a81626c..e4425826ecc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -36,7 +36,7 @@ public class InspectImageFile { public static void inspectImageFile() { // TODO(developer): Replace these variables before running the sample. - String projectId = "my-project-id"; + String projectId = "your-project-id"; String filePath = "path/to/image.png"; inspectImageFile(projectId, filePath); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index c41bc975510..f8180b8323d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -35,7 +35,7 @@ public class InspectString { public static void inspectString() { // TODO(developer): Replace these variables before running the sample. - String projectId = "my-project-id"; + String projectId = "your-project-id"; String textToInspect = "My name is Gary and my email is gary@example.com"; inspectString(projectId, textToInspect); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index 3eee7c9ce40..0050c8de8cd 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -36,8 +36,8 @@ public class InspectTextFile { public static void inspectTextFile() { // TODO(developer): Replace these variables before running the sample. - String projectId = "my-project-id"; - String filePath = "path/to/image.png"; + String projectId = "your-project-id"; + String filePath = "path/to/file.txt"; inspectTextFile(projectId, filePath); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java new file mode 100644 index 00000000000..84ff70a395b --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_delete_job] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJobName; + +import java.io.IOException; + +public class JobsDelete { + public static void deleteJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String jobId = "your-job-id"; + deleteJobs(projectId,jobId); + } + + // Deletes a DLP Job with the given jobId + public static void deleteJobs(String projectId, String jobId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Construct the complete job name from the projectId and jobId + DlpJobName jobName = DlpJobName.of(projectId, jobId); + + // Construct the job deletion request to be sent by the client. + DeleteDlpJobRequest deleteDlpJobRequest = + DeleteDlpJobRequest.newBuilder().setName(jobName.toString()).build(); + + // Send the job deletion request + dlpServiceClient.deleteDlpJob(deleteDlpJobRequest); + System.out.println("Job deleted successfully."); + } + } +} +// [END dlp_delete_job] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java new file mode 100644 index 00000000000..1b00f840fd3 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_list_jobs] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobType; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ProjectName; + +import java.io.IOException; + +public class JobsList { + + public static void listJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listJobs(projectId); + } + + // Lists DLP jobs + public static void listJobs(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Construct the request to be sent by the client. + // For more info on filters and job types, + // see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list + ListDlpJobsRequest listDlpJobsRequest = + ListDlpJobsRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setFilter("state=DONE") + .setType(DlpJobType.valueOf("INSPECT_JOB")) + .build(); + + // Send the request to list jobs and process the response + DlpServiceClient.ListDlpJobsPagedResponse response = + dlpServiceClient.listDlpJobs(listDlpJobsRequest); + + System.out.println("DLP jobs found:"); + for (DlpJob dlpJob : response.getPage().getValues()) { + System.out.println(dlpJob.getName() + " -- " + dlpJob.getState()); + } + } + } +} +// [END dlp_list_jobs] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java index 245a7d5f56e..e00df1842fe 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java @@ -27,7 +27,7 @@ public class ReIdentifyWithFpe { public static void reIdentifyWithFpe() throws IOException { // TODO(developer): Replace these variables before running the sample. - String projectId = "YOUR_PROJECT_ID"; + String projectId = "your-project-id"; String textToReIdentify = "My SSN is SSN_TOKEN(9):731997681"; String kmsKeyName = "projects/YOUR_PROJECT/" diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index 64665bd8c9e..86413db1619 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -36,7 +36,7 @@ class RedactImageFile { public static void redactImageFile() { // TODO(developer): Replace these variables before running the sample. - String projectId = "my-project-id"; + String projectId = "your-project-id"; String filePath = "path/to/image.png"; redactImageFile(projectId, filePath); } diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java deleted file mode 100644 index 73ecff9d8f4..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/JobsIT.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -// CHECKSTYLE OFF: AbbreviationAsWordInName -@RunWith(JUnit4.class) -public class JobsIT { - // CHECKSTYLE ON: AbbreviationAsWordInName - - private ByteArrayOutputStream bout; - private PrintStream out; - - private static final Pattern jobIdPattern = Pattern.compile("projects/.*/dlpJobs/i-\\d+"); - - // Update to Google Cloud Storage path containing test.txt - private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testListJobs() throws Exception { - Jobs.main(new String[] {"-l", "-filter", "state=DONE"}); - String output = bout.toString(); - Matcher matcher = jobIdPattern.matcher(bout.toString()); - assertTrue("List must contain results.", matcher.find()); - } - - @Test - public void testDeleteJobs() throws Exception { - // Get a list of JobIds, and extract one to delete - Jobs.main(new String[] {"-l", "-filter", "state=DONE"}); - String jobList = bout.toString(); - Matcher matcher = jobIdPattern.matcher(jobList); - assertTrue("List must contain results.", matcher.find()); - // Extract just the ID - String jobId = matcher.group(0).split("/")[3]; - bout.reset(); - - // Delete the Job - Jobs.main(new String[] {"-d", "-jobId", jobId}); - String output = bout.toString(); - assertThat(output, containsString("Job deleted successfully.")); - } -} diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java deleted file mode 100644 index a4b968221c0..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/MetadataIT.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class MetadataIT { - // CHECKSTYLE ON: AbbreviationAsWordInName - - private ByteArrayOutputStream bout; - private PrintStream out; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testListInfoTypes() throws Exception { - Metadata.main( - new String[] { - "-language", "en-US", - "-filter", "supported_by=INSPECT" - }); - String output = bout.toString(); - assertTrue(output.contains("Name") && output.contains("Display name")); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index 1031d827a94..e10e536f6f5 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -16,20 +16,22 @@ package dlp.snippets; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertNotNull; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertNotNull; @RunWith(JUnit4.class) public class DeIdentificationTests { @@ -104,6 +106,9 @@ public void testDeIdentifyWithDateShift() throws IOException { String output = bout.toString(); assertThat(output, containsString("Content written to file: ")); + + // Clean up test output + Files.delete(outputFile); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java new file mode 100644 index 00000000000..d66366fe716 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import org.hamcrest.CoreMatchers; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) + +public class InfoTypesTests { + + private ByteArrayOutputStream bout; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @Before + public void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testListInfoTypes() throws Exception { + InfoTypesList.listInfoTypes(); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Name")); + assertThat(output, CoreMatchers.containsString("Display name")); + } +} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java new file mode 100644 index 00000000000..fd7ee234196 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -0,0 +1,136 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import com.google.common.util.concurrent.SettableFuture; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; + +import org.hamcrest.CoreMatchers; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +@RunWith(JUnit4.class) +public class JobsTests { + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String GCS_PATH = System.getenv("GCS_PATH"); + + + + private ByteArrayOutputStream bout; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + private static DlpJob createJob(String jobId) throws IOException { + try (DlpServiceClient dlp = DlpServiceClient.create()) { + FileSet fileSet = FileSet.newBuilder().setUrl(GCS_PATH).build(); + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder().setFileSet(fileSet).build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setInspectJob(inspectJobConfig) + .setJobId(jobId) + .build(); + + return dlp.createDlpJob(createDlpJobRequest); + } + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("GCS_PATH"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testListJobs() throws Exception { + // Call listJobs to print out a list of jobIds + JobsList.listJobs(PROJECT_ID); + String output = bout.toString(); + + // Check that the output contains a list of jobs, or is empty + assertThat(output, CoreMatchers.containsString("DLP jobs found:")); + } + + @Test + public void testDeleteJobs() throws Exception { + // Create a job with a unique UUID to be deleted + String jobId = UUID.randomUUID().toString(); + createJob(jobId); + + // Delete the job with the specified ID + JobsDelete.deleteJobs(PROJECT_ID, "i-" + jobId); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Job deleted successfully.")); + } +} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 906091d073c..3e50dea73b7 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -16,12 +16,6 @@ package dlp.snippets; -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -29,6 +23,17 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import static junit.framework.TestCase.assertNotNull; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertThat; + @RunWith(JUnit4.class) public class RedactTests { @@ -61,11 +66,18 @@ public void tearDown() { bout.reset(); } + @After + public void cleanUp() throws IOException { + Path outputFile = Paths.get("redacted.png"); + Files.delete(outputFile); + } + @Test public void testRedactImage() { RedactImageFile.redactImageFile(PROJECT_ID, "src/test/resources/test.png"); String output = bout.toString(); assertThat(output, containsString("Redacted image written")); + } } From e7493585a4e001d076b0d923a7a83e5affa4800e Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Fri, 14 Feb 2020 15:06:24 -0800 Subject: [PATCH 053/406] samples: Cleanup DLP Triggers Snippets (#2062) * refactored triggers samples into snippet format * removed extra newline * Remove extra newline. Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> --- .../main/java/com/example/dlp/Triggers.java | 313 ------------------ .../java/dlp/snippets/TriggersCreate.java | 124 +++++++ .../java/dlp/snippets/TriggersDelete.java | 53 +++ .../main/java/dlp/snippets/TriggersList.java | 66 ++++ .../test/java/com/example/dlp/TriggersIT.java | 103 ------ .../test/java/dlp/snippets/TriggersTests.java | 151 +++++++++ 6 files changed, 394 insertions(+), 416 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java deleted file mode 100644 index 234ead4c703..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Triggers.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.CloudStorageOptions; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ProjectJobTriggerName; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.Schedule; -import com.google.privacy.dlp.v2.StorageConfig; -import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; -import com.google.protobuf.Duration; -import java.util.ArrayList; -import java.util.List; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Triggers { - - // [START dlp_create_trigger] - /** - * Schedule a DLP inspection trigger for a GCS location. - * - * @param triggerId (Optional) name of the trigger to be created - * @param displayName (Optional) display name for the trigger to be created - * @param description (Optional) description for the trigger to be created - * @param autoPopulateTimespan If true, limits scans to new content only. - * @param scanPeriod How often to wait between scans, in days (minimum = 1 day) - * @param infoTypes infoTypes of information to match eg. InfoType.PHONE_NUMBER, - * InfoType.EMAIL_ADDRESS - * @param minLikelihood minimum likelihood required before returning a match - * @param maxFindings maximum number of findings to report per request (0 = server maximum) - * @param projectId The project ID to run the API call under - */ - private static void createTrigger( - String triggerId, - String displayName, - String description, - String bucketName, - String fileName, - boolean autoPopulateTimespan, - int scanPeriod, - List infoTypes, - Likelihood minLikelihood, - int maxFindings, - String projectId) - throws Exception { - - // instantiate a client - DlpServiceClient dlpServiceClient = DlpServiceClient.create(); - try { - - CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder() - .setFileSet( - CloudStorageOptions.FileSet.newBuilder() - .setUrl("gs://" + bucketName + "/" + fileName)) - .build(); - - TimespanConfig timespanConfig = TimespanConfig.newBuilder() - .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan).build(); - - StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions) - .setTimespanConfig(timespanConfig).build(); - - InspectConfig.FindingLimits findingLimits = - InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .build(); - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setInspectConfig(inspectConfig) - .setStorageConfig(storageConfig) - .build(); - - // Schedule scan of GCS bucket every scanPeriod number of days (minimum = 1 day) - Duration duration = Duration.newBuilder().setSeconds(scanPeriod * 24 * 3600).build(); - Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); - JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); - JobTrigger jobTrigger = - JobTrigger.newBuilder() - .setInspectJob(inspectJobConfig) - .setName(triggerId) - .setDisplayName(displayName) - .setDescription(description) - .setStatus(JobTrigger.Status.HEALTHY) - .addTriggers(trigger) - .build(); - - // Create scan request - CreateJobTriggerRequest createJobTriggerRequest = - CreateJobTriggerRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setJobTrigger(jobTrigger) - .build(); - - JobTrigger createdJobTrigger = dlpServiceClient.createJobTrigger(createJobTriggerRequest); - - System.out.println("Created Trigger: " + createdJobTrigger.getName()); - } catch (Exception e) { - System.out.println("Error creating trigger: " + e.getMessage()); - } - } - // [END dlp_create_trigger] - - // [START dlp_list_triggers] - /** - * List all DLP triggers for a given project. - * - * @param projectId The project ID to run the API call under. - */ - private static void listTriggers(String projectId) { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - ListJobTriggersRequest listJobTriggersRequest = - ListJobTriggersRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .build(); - DlpServiceClient.ListJobTriggersPagedResponse response = - dlpServiceClient.listJobTriggers(listJobTriggersRequest); - response - .getPage() - .getValues() - .forEach( - trigger -> { - System.out.println("Trigger: " + trigger.getName()); - System.out.println("\tCreated: " + trigger.getCreateTime()); - System.out.println("\tUpdated: " + trigger.getUpdateTime()); - if (trigger.getDisplayName() != null) { - System.out.println("\tDisplay name: " + trigger.getDisplayName()); - } - if (trigger.getDescription() != null) { - System.out.println("\tDescription: " + trigger.getDescription()); - } - System.out.println("\tStatus: " + trigger.getStatus()); - System.out.println("\tError count: " + trigger.getErrorsCount()); - }); - } catch (Exception e) { - System.out.println("Error listing triggers :" + e.getMessage()); - } - } - // [END dlp_list_triggers] - - // [START dlp_delete_trigger] - /** - * Delete a DLP trigger in a project. - * - * @param projectId The project ID to run the API call under. - * @param triggerId Trigger ID - */ - private static void deleteTrigger(String projectId, String triggerId) { - - ProjectJobTriggerName triggerName = ProjectJobTriggerName.of(projectId, triggerId); - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - DeleteJobTriggerRequest deleteJobTriggerRequest = - DeleteJobTriggerRequest.newBuilder().setName(triggerName.toString()).build(); - dlpServiceClient.deleteJobTrigger(deleteJobTriggerRequest); - - System.out.println("Trigger deleted: " + triggerName.toString()); - } catch (Exception e) { - System.out.println("Error deleting trigger :" + e.getMessage()); - } - } - // [END dlp_delete_trigger] - - /** Command line application to crate, list and delete triggers. */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - - Option createTriggerOption = - new Option("c", "create", false, "Create trigger to scan a GCS bucket"); - optionsGroup.addOption(createTriggerOption); - - Option listTriggersOption = new Option("l", "list", false, "List triggers"); - optionsGroup.addOption(listTriggersOption); - - Option deleteTriggerOption = new Option("d", "delete", false, "Delete trigger"); - optionsGroup.addOption(deleteTriggerOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option bucketNameOption = Option.builder("bucketName").hasArg(true).required(false).build(); - commandLineOptions.addOption(bucketNameOption); - - Option gcsFileNameOption = Option.builder("fileName").hasArg(true).required(false).build(); - commandLineOptions.addOption(gcsFileNameOption); - - Option autoPopulateTimespanOption = Option.builder("autoPopulateTimespan").required(false) - .build(); - commandLineOptions.addOption(autoPopulateTimespanOption); - - Option minLikelihoodOption = - Option.builder("minLikelihood").hasArg(true).required(false).build(); - - commandLineOptions.addOption(minLikelihoodOption); - - Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); - - commandLineOptions.addOption(maxFindingsOption); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - Option triggerIdOption = Option.builder("triggerId").hasArg(true).required(false).build(); - commandLineOptions.addOption(triggerIdOption); - Option displayNameOption = Option.builder("displayName").hasArg(true).required(false).build(); - commandLineOptions.addOption(displayNameOption); - Option descriptionOption = Option.builder("description").hasArg(true).required(false).build(); - commandLineOptions.addOption(descriptionOption); - - Option scanPeriodOption = Option.builder("scanPeriod").hasArg(true).required(false).build(); - commandLineOptions.addOption(scanPeriodOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(Triggers.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - String projectId = - cmd.getOptionValue(projectIdOption.getOpt()); - if (cmd.hasOption("c")) { - Likelihood minLikelihood = - Likelihood.valueOf( - cmd.getOptionValue( - minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); - int maxFindings = Integer.parseInt(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); - String triggerId = cmd.getOptionValue(triggerIdOption.getOpt()); - String displayName = cmd.getOptionValue(displayNameOption.getOpt(), ""); - String description = cmd.getOptionValue(descriptionOption.getOpt(), ""); - String bucketName = cmd.getOptionValue(bucketNameOption.getOpt()); - String fileName = cmd.getOptionValue(gcsFileNameOption.getOpt()); - boolean autoPopulateTimespan = Boolean - .valueOf(cmd.getOptionValue(autoPopulateTimespanOption.getOpt())); - int scanPeriod = Integer.valueOf(cmd.getOptionValue(scanPeriodOption.getOpt())); - List infoTypesList = new ArrayList<>(); - if (cmd.hasOption(infoTypesOption.getOpt())) { - infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - createTrigger( - triggerId, - displayName, - description, - bucketName, - fileName, - autoPopulateTimespan, - scanPeriod, - infoTypesList, - minLikelihood, - maxFindings, - projectId); - } else if (cmd.hasOption("l")) { - // list triggers - listTriggers(projectId); - } else if (cmd.hasOption("d")) { - String triggerId = cmd.getOptionValue(triggerIdOption.getOpt()); - deleteTrigger(projectId, triggerId); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java new file mode 100644 index 00000000000..5eceed08ccb --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java @@ -0,0 +1,124 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_create_trigger] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.Schedule; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; +import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; +import com.google.protobuf.Duration; + +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.util.List; +import java.util.ArrayList; + + +public class TriggersCreate { + + public static void createTrigger() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; + createTrigger(projectId, gcsPath); + } + + public static void createTrigger(String projectId, String gcsPath) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()){ + + // Set autoPopulateTimespan to true to scan only new content + boolean autoPopulateTimespan = true; + TimespanConfig timespanConfig = TimespanConfig.newBuilder() + .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan).build(); + + // Specify the GCS file to be inspected. + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(gcsPath)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions) + .setTimespanConfig(timespanConfig).build(); + + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); + + // Configure the inspection job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(inspectConfig) + .setStorageConfig(storageConfig) + .build(); + + // Set scanPeriod to the number of days between scans (minimum: 1 day) + int scanPeriod = 1; + + // Optionally set a display name of max 100 chars and a description of max 250 chars + String displayName = "Daily Scan"; + String description = "A daily inspection for personally identifiable information."; + + // Schedule scan of GCS bucket every scanPeriod number of days (minimum = 1 day) + Duration duration = Duration.newBuilder().setSeconds(scanPeriod * 24 * 3600).build(); + Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); + JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); + JobTrigger jobTrigger = + JobTrigger.newBuilder() + .setInspectJob(inspectJobConfig) + .setDisplayName(displayName) + .setDescription(description) + .setStatus(JobTrigger.Status.HEALTHY) + .addTriggers(trigger) + .build(); + + // Create scan request to be sent by client + CreateJobTriggerRequest createJobTriggerRequest = + CreateJobTriggerRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setJobTrigger(jobTrigger) + .build(); + + // Send the scan request and process the response + JobTrigger createdJobTrigger = dlpServiceClient.createJobTrigger(createJobTriggerRequest); + + System.out.println("Created Trigger: " + createdJobTrigger.getName()); + System.out.println("Display Name: " + createdJobTrigger.getDisplayName()); + System.out.println("Description: " + createdJobTrigger.getDescription()); + } + } +} +// [END dlp_create_trigger] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java new file mode 100644 index 00000000000..305bf63b481 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_delete_trigger] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.ProjectJobTriggerName; + + +class TriggersDelete { + + public static void deleteTrigger() throws Exception{ + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String triggerId = "your-trigger-id"; + deleteTrigger(projectId, triggerId); + } + + public static void deleteTrigger(String projectId, String triggerId) throws Exception{ + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Get the full trigger name from the given triggerId and ProjectId + ProjectJobTriggerName triggerName = ProjectJobTriggerName.of(projectId, triggerId); + + // Construct the trigger deletion request to be sent by the client + DeleteJobTriggerRequest deleteJobTriggerRequest = + DeleteJobTriggerRequest.newBuilder().setName(triggerName.toString()).build(); + + // Send the trigger deletion request + dlpServiceClient.deleteJobTrigger(deleteJobTriggerRequest); + System.out.println("Trigger deleted: " + triggerName.toString()); + } + } +} +// [END dlp_delete_trigger] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java new file mode 100644 index 00000000000..9a2fdc1cfaa --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_list_triggers] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ProjectName; + + +class TriggersList { + public static void listTriggers() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listTriggers(projectId); + } + + public static void listTriggers(String projectId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Build the request to be sent by the client + ListJobTriggersRequest listJobTriggersRequest = + ListJobTriggersRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .build(); + + // Use the client to send the API request. + DlpServiceClient.ListJobTriggersPagedResponse response = + dlpServiceClient.listJobTriggers(listJobTriggersRequest); + + // Parse the response and prpcess the results + System.out.println("DLP triggers found:"); + for (JobTrigger trigger : response.getPage().getValues()) { + System.out.println("Trigger: " + trigger.getName()); + System.out.println("\tCreated: " + trigger.getCreateTime()); + System.out.println("\tUpdated: " + trigger.getUpdateTime()); + if (trigger.getDisplayName() != null) { + System.out.println("\tDisplay name: " + trigger.getDisplayName()); + } + if (trigger.getDescription() != null) { + System.out.println("\tDescription: " + trigger.getDescription()); + } + System.out.println("\tStatus: " + trigger.getStatus()); + System.out.println("\tError count: " + trigger.getErrorsCount()); + }; + } + } +} +// [END dlp_list_triggers] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java deleted file mode 100644 index b559ce7a738..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/TriggersIT.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.util.UUID; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class TriggersIT { - - //CHECKSTYLE ON: AbbreviationAsWordInName - - private ByteArrayOutputStream bout; - - private String bucketName = System.getenv("GOOGLE_CLOUD_PROJECT") + "/dlp"; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testCreateTrigger() throws Exception { - Triggers.main( - new String[] { - "-c", - "-displayName", - String.format("trigger-name-%s", UUID.randomUUID()), - "-triggerId", - String.format("trigger%s", UUID.randomUUID()), - "-description", - String.format("description-%s", UUID.randomUUID()), - "-bucketName", - bucketName, - "-fileName", - "test.txt", - "-autoPopulateTimespan", - "-scanPeriod", - "1" - }); - String output = bout.toString(); - assertThat(output, containsString("Created Trigger:")); - } - - @Test - public void testListTrigger() throws Exception { - Triggers.main(new String[] {"-l"}); - String output = bout.toString(); - assertThat(output, containsString("Trigger:")); - } - - @Test - public void testDeleteTrigger() throws Exception { - Triggers.main(new String[] {"-l"}); - String output = bout.toString(); - Matcher templateIds = Pattern.compile("(?<=jobTriggers/)[0-9]+").matcher(output); - assertTrue(templateIds.find()); - String triggerId = templateIds.group(0); - bout.reset(); - Triggers.main( - new String[] { - "-d", "-triggerId", triggerId, - }); - output = bout.toString(); - assertThat(output, containsString("Trigger deleted:")); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java new file mode 100644 index 00000000000..720a1cfb38b --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.privacy.dlp.v2.Schedule; +import com.google.protobuf.Duration; + + +import org.hamcrest.CoreMatchers; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + + + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +@RunWith(JUnit4.class) +public class TriggersTests { + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String GCS_PATH = System.getenv("GCS_PATH"); + + private ByteArrayOutputStream bout; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + private static JobTrigger createTrigger() throws IOException { + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(GCS_PATH)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(InspectConfig.newBuilder().build()) + .setStorageConfig(storageConfig) + .build(); + + Duration duration = Duration.newBuilder().setSeconds(24 * 3600).build(); + Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); + JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); + JobTrigger jobTrigger = + JobTrigger.newBuilder() + .setInspectJob(inspectJobConfig) + .setStatus(JobTrigger.Status.HEALTHY) + .addTriggers(trigger) + .build(); + + CreateJobTriggerRequest createJobTriggerRequest = + CreateJobTriggerRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setJobTrigger(jobTrigger) + .build(); + + return dlpServiceClient.createJobTrigger(createJobTriggerRequest); + } + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("GCS_PATH"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateTrigger() throws Exception { + TriggersCreate.createTrigger(PROJECT_ID, GCS_PATH); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Created Trigger:")); + } + + @Test + public void testListTrigger() throws Exception { + TriggersList.listTriggers(PROJECT_ID); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("DLP triggers found:")); + } + + @Test + public void testDeleteTrigger() throws Exception { + JobTrigger trigger = createTrigger(); + String triggerName = createTrigger().getName(); + String triggerId; + + Matcher matcher = Pattern.compile("jobTriggers/").matcher(triggerName); + if(matcher.find()) { + triggerId = triggerName.substring(matcher.end()); + } else { + throw new Exception("Could not extract triggerID"); + } + + // Delete the job with the specified ID + TriggersDelete.deleteTrigger(PROJECT_ID, triggerId); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Trigger deleted:")); + } +} From f293245a4f48beabbb02afffa85b54bcedd4fadb Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Fri, 14 Feb 2020 15:09:47 -0800 Subject: [PATCH 054/406] samples: Cleanup DLP Templates Snippets (#2065) * refactored templates snippets * Update dlp/src/main/java/dlp/snippets/TemplatesCreate.java Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> --- .../main/java/com/example/dlp/Templates.java | 262 ------------------ .../java/dlp/snippets/TemplatesCreate.java | 85 ++++++ .../java/dlp/snippets/TemplatesDelete.java | 53 ++++ .../main/java/dlp/snippets/TemplatesList.java | 76 +++++ .../java/com/example/dlp/TemplatesIT.java | 93 ------- .../java/dlp/snippets/TemplatesTests.java | 139 ++++++++++ 6 files changed, 353 insertions(+), 355 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java delete mode 100644 dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java deleted file mode 100644 index d59c6d52a8f..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/Templates.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPage; -import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectConfig.FindingLimits; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ProjectName; -import java.util.ArrayList; -import java.util.List; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class Templates { - - // [START dlp_create_inspect_template] - /** - * Create a new DLP inspection configuration template. - * - * @param displayName (Optional) The human-readable name to give the template - * @param projectId Google Cloud Project ID to call the API under - * @param templateId (Optional) The name of the template to be created - * @param infoTypeList The infoTypes of information to match - * @param minLikelihood The minimum likelihood required before returning a match - * @param maxFindings The maximum number of findings to report per request (0 = server maximum) - */ - private static void createInspectTemplate( - String displayName, - String templateId, - String description, - String projectId, - List infoTypeList, - Likelihood minLikelihood, - int maxFindings) { - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - FindingLimits findingLimits = - FindingLimits.newBuilder().setMaxFindingsPerRequest(maxFindings).build(); - - // Construct the inspection configuration for the template - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypeList) - .setMinLikelihood(minLikelihood) - .setLimits(findingLimits) - .build(); - - InspectTemplate inspectTemplate = - InspectTemplate.newBuilder() - .setInspectConfig(inspectConfig) - .setDisplayName(displayName) - .setDescription(description) - .build(); - - CreateInspectTemplateRequest createInspectTemplateRequest = - CreateInspectTemplateRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectTemplate(inspectTemplate) - .setTemplateId(templateId) - .build(); - - InspectTemplate response = - dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); - System.out.printf("Template created: %s", response.getName()); - } catch (Exception e) { - System.out.printf("Error creating template: %s", e.getMessage()); - } - } - // [END dlp_create_inspect_template] - - // [START dlp_list_inspect_templates] - /** - * List DLP inspection templates created in a given project - * - * @param projectId Google Cloud Project ID - */ - private static void listInspectTemplates(String projectId) { - - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setPageSize(1) - .build(); - - ListInspectTemplatesPagedResponse response = dlpServiceClient.listInspectTemplates(request); - ListInspectTemplatesPage page = response.getPage(); - ListInspectTemplatesResponse templatesResponse = page.getResponse(); - - for (InspectTemplate template : templatesResponse.getInspectTemplatesList()) { - System.out.printf("Template name: %s\n", template.getName()); - if (template.getDisplayName() != null) { - System.out.printf("\tDisplay name: %s \n", template.getDisplayName()); - System.out.printf("\tCreate time: %s \n", template.getCreateTime()); - System.out.printf("\tUpdate time: %s \n", template.getUpdateTime()); - - // print inspection config - InspectConfig inspectConfig = template.getInspectConfig(); - for (InfoType infoType : inspectConfig.getInfoTypesList()) { - System.out.printf("\tInfoType: %s\n", infoType.getName()); - } - System.out.printf("\tMin likelihood: %s\n", inspectConfig.getMinLikelihood()); - System.out.printf("\tLimits: %s\n", inspectConfig.getLimits().getMaxFindingsPerRequest()); - } - } - } catch (Exception e) { - System.out.printf("Error creating template: %s", e.getMessage()); - } - } - // [END dlp_list_inspect_templates] - - // [START dlp_delete_inspect_template] - /** - * Delete the DLP inspection configuration template with the specified name. - * - * @param projectId Google Cloud Project ID - * @param templateId Template ID to be deleted - */ - private static void deleteInspectTemplate(String projectId, String templateId) { - - // construct the template name to be deleted - String templateName = String.format("projects/%s/inspectTemplates/%s", projectId, templateId); - // instantiate the client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // create delete template request - DeleteInspectTemplateRequest request = - DeleteInspectTemplateRequest.newBuilder().setName(templateName).build(); - - dlpServiceClient.deleteInspectTemplate(request); - System.out.printf("Deleted template: %s\n", templateName); - } catch (Exception e) { - System.err.printf("Error deleting template: %s\n", templateName); - } - } - // [END dlp_delete_inspect_template] - - /** Command line application to create, list and delete DLP inspect templates. */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - - Option createOption = new Option("c", "create", false, "Create inspect template"); - optionsGroup.addOption(createOption); - - Option listOption = new Option("l", "list", false, "List inspect templates"); - optionsGroup.addOption(listOption); - - Option deleteOption = new Option("d", "delete", false, "Delete inspect template"); - optionsGroup.addOption(deleteOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - Option minLikelihoodOption = - Option.builder("minLikelihood").hasArg(true).required(false).build(); - commandLineOptions.addOption(minLikelihoodOption); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - Option templateIdOption = Option.builder("templateId").hasArg(true).required(false).build(); - commandLineOptions.addOption(templateIdOption); - - Option templateDescription = Option.builder("description").hasArg(true).required(false).build(); - commandLineOptions.addOption(templateDescription); - - Option templateDisplayNameOption = - Option.builder("displayName").hasArg(true).required(false).build(); - commandLineOptions.addOption(templateDisplayNameOption); - - Option includeQuoteOption = Option.builder("includeQuote").hasArg(true).required(false).build(); - commandLineOptions.addOption(includeQuoteOption); - - Option maxFindingsOption = Option.builder("maxFindings").hasArg(true).required(false).build(); - commandLineOptions.addOption(maxFindingsOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp("dlp_snippets", commandLineOptions); - System.exit(1); - return; - } - - String projectId = - cmd.getOptionValue(projectIdOption.getOpt(), ""); - - if (cmd.hasOption(createOption.getOpt())) { - String templateId = cmd.getOptionValue(templateIdOption.getOpt()); - String displayName = cmd.getOptionValue(templateDisplayNameOption.getOpt()); - String description = cmd.getOptionValue(templateDescription.getOpt()); - - Likelihood minLikelihood = - Likelihood.valueOf( - cmd.getOptionValue( - minLikelihoodOption.getOpt(), Likelihood.LIKELIHOOD_UNSPECIFIED.name())); - - List infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - if (infoTypes != null) { - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - int maxFindings = Integer.valueOf(cmd.getOptionValue(maxFindingsOption.getOpt(), "0")); - createInspectTemplate( - displayName, - templateId, - description, - projectId, - infoTypesList, - minLikelihood, - maxFindings); - - } else if (cmd.hasOption(listOption.getOpt())) { - listInspectTemplates(projectId); - } else if (cmd.hasOption(deleteOption.getOpt())) { - String templateId = cmd.getOptionValue(templateIdOption.getOpt()); - deleteInspectTemplate(projectId, templateId); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java new file mode 100644 index 00000000000..95ca2a26722 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_create_inspect_template] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.ProjectName; + +import java.io.IOException; +import java.util.List; +import java.util.stream.Stream; +import java.util.stream.Collectors; + +class TemplatesCreate { + + public static void createInspectTemplate() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + createInspectTemplate(projectId); + } + + // Creates a template to persist configuration information + public static void createInspectTemplate(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + // Construct the inspection configuration for the template + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + + // Optionally set a display name and a description for the template + String displayName = "Inspection Config Template"; + String description = "Save configuration for future inspection jobs"; + + // Build the template + InspectTemplate inspectTemplate = + InspectTemplate.newBuilder() + .setInspectConfig(inspectConfig) + .setDisplayName(displayName) + .setDescription(description) + .build(); + + // Create the request to be sent by the client + CreateInspectTemplateRequest createInspectTemplateRequest = + CreateInspectTemplateRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectTemplate(inspectTemplate) + .build(); + + // Send the request to the API and process the response + InspectTemplate response = + dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); + System.out.printf("Template created: %s", response.getName()); + } + } +} +// [END dlp_create_inspect_template] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java new file mode 100644 index 00000000000..3cfc3cb5596 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_delete_inspect_template] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; + +import java.io.IOException; + +class TemplatesDelete { + + public static void deleteInspectTemplate() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String templateId = "your-template-id"; + deleteInspectTemplate(projectId, templateId); + } + // Delete an existing template + public static void deleteInspectTemplate(String projectId, String templateId) throws IOException{ + // Construct the template name to be deleted + String templateName = String.format("projects/%s/inspectTemplates/%s", projectId, templateId); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Create delete template request to be sent by the client + DeleteInspectTemplateRequest request = + DeleteInspectTemplateRequest.newBuilder().setName(templateName).build(); + + // Send the request with the client + dlpServiceClient.deleteInspectTemplate(request); + System.out.printf("Deleted template: %s\n", templateName); + } + } +} +// [END dlp_delete_inspect_template] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java new file mode 100644 index 00000000000..078551d227f --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_list_inspect_templates] +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ProjectName; + +import java.io.IOException; + +class TemplatesList { + + public static void listInspectTemplates() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listInspectTemplates(projectId); + } + + // Lists all templates associated with a given project + public static void listInspectTemplates(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Create the request to be sent by the client + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setPageSize(1) + .build(); + + // Send the request + ListInspectTemplatesPagedResponse response = dlpServiceClient.listInspectTemplates(request); + + // Parse through and process the response + System.out.println("Templates found:"); + for (InspectTemplate template : response.getPage().getResponse().getInspectTemplatesList()) { + System.out.printf("Template name: %s\n", template.getName()); + if (template.getDisplayName() != null) { + System.out.printf("\tDisplay name: %s \n", template.getDisplayName()); + System.out.printf("\tCreate time: %s \n", template.getCreateTime()); + System.out.printf("\tUpdate time: %s \n", template.getUpdateTime()); + + // print inspection config + InspectConfig inspectConfig = template.getInspectConfig(); + for (InfoType infoType : inspectConfig.getInfoTypesList()) { + System.out.printf("\tInfoType: %s\n", infoType.getName()); + } + System.out.printf("\tMin likelihood: %s\n", inspectConfig.getMinLikelihood()); + System.out.printf("\tLimits: %s\n", inspectConfig.getLimits().getMaxFindingsPerRequest()); + } + } + } + } +} +// [END dlp_list_inspect_templates] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java b/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java deleted file mode 100644 index 11c3525d12d..00000000000 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/TemplatesIT.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2018 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.util.UUID; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class TemplatesIT { - // CHECKSTYLE ON: AbbreviationAsWordInName - - private ByteArrayOutputStream bout; - private PrintStream out; - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testCreateInspectTemplate() throws Exception { - Templates.main( - new String[] { - "-c", - "-displayName", - String.format("test-name-%s", UUID.randomUUID()), - "-templateId", - String.format("template%s", UUID.randomUUID()), - "-description", - String.format("description-%s", UUID.randomUUID()) - }); - String output = bout.toString(); - assertThat(output, containsString("Template created: ")); - } - - @Test - public void testListInspectemplate() throws Exception { - Templates.main(new String[] {"-l"}); - String output = bout.toString(); - assertThat(output, containsString("Template name:")); - } - - @Test - public void testDeleteInspectTemplate() throws Exception { - // Extract a Template ID - Templates.main(new String[] {"-l"}); - String output = bout.toString(); - Matcher templateIds = Pattern.compile("template(\\w|\\-)+").matcher(output); - assertTrue(templateIds.find()); - String templateId = templateIds.group(0); - bout.reset(); - Templates.main(new String[] {"-d", "-templateId", templateId}); - output = bout.toString(); - assertThat(output, containsString("Deleted template:")); - } -} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java new file mode 100644 index 00000000000..ec602ae57f9 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.ProjectName; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.io.IOException; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Stream; +import java.util.stream.Collectors; + +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) + +public class TemplatesTests { + + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + private ByteArrayOutputStream bout; + + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + private static InspectTemplate createTemplate() throws IOException{ + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + + InspectTemplate inspectTemplate = + InspectTemplate.newBuilder() + .setInspectConfig(inspectConfig) + .build(); + + CreateInspectTemplateRequest createInspectTemplateRequest = + CreateInspectTemplateRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setInspectTemplate(inspectTemplate) + .build(); + + return dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); + } + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateInspectTemplate() throws Exception { + TemplatesCreate.createInspectTemplate(PROJECT_ID); + String output = bout.toString(); + assertThat(output, containsString("Template created: ")); + } + + @Test + public void testListInspectemplate() throws Exception { + TemplatesList.listInspectTemplates(PROJECT_ID); + String output = bout.toString(); + assertThat(output, containsString("Templates found:")); + } + + @Test + public void testDeleteInspectTemplate() throws Exception { + // Create a template to be deleted and extract its ID + InspectTemplate template = createTemplate(); + String templateName = template.getName(); + String templateId; + + Matcher matcher = Pattern.compile("inspectTemplates/").matcher(templateName); + if (matcher.find()){ + templateId = templateName.substring(matcher.end()); + } else { + throw new Exception("Could not extract templateId"); + } + + // Delete the template with the specified ID + TemplatesDelete.deleteInspectTemplate(PROJECT_ID, templateId); + String output = bout.toString(); + assertThat(output, containsString("Deleted template:")); + } +} From 4417dd1a13e28a8ca3042e9c64760d7b2b8eb137 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Wed, 19 Feb 2020 13:16:01 -0800 Subject: [PATCH 055/406] samples: Cleanup DLP Risk Analysis snippets (#2069) * refactored Risk analysis samples * updated inspect tests and readme * moved parameters to inline, cleaned up files, reformatted for consistency * replaced iterators with intstream in RiskAnalysisKMap * moved message receiver lambda to its own method * ran code formatter * refactored long messageReciever lambda * rewrote lambda for pubsub message receiver * replaced int stream with for loop --- .../java/com/example/dlp/RiskAnalysis.java | 859 ------------------ .../RiskAnalysisCategoricalStats.java | 174 ++++ .../dlp/snippets/RiskAnalysisKAnonymity.java | 182 ++++ .../java/dlp/snippets/RiskAnalysisKMap.java | 211 +++++ .../dlp/snippets/RiskAnalysisLDiversity.java | 191 ++++ .../snippets/RiskAnalysisNumericalStats.java | 170 ++++ .../test/java/dlp/snippets/InspectTests.java | 24 +- .../snippets/RiskAnalysisTests.java} | 127 +-- 8 files changed, 977 insertions(+), 961 deletions(-) delete mode 100644 dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java rename dlp/snippets/snippets/src/test/java/{com/example/dlp/RiskAnalysisIT.java => dlp/snippets/RiskAnalysisTests.java} (53%) diff --git a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java b/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java deleted file mode 100644 index 746d15518a6..00000000000 --- a/dlp/snippets/snippets/src/main/java/com/example/dlp/RiskAnalysis.java +++ /dev/null @@ -1,859 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.dlp; - -import com.google.api.core.SettableApiFuture; -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.cloud.pubsub.v1.Subscriber; -import com.google.privacy.dlp.v2.Action; -import com.google.privacy.dlp.v2.Action.PublishToPubSub; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; -import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; -import com.google.privacy.dlp.v2.BigQueryTable; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FieldId; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.PrivacyMetric; -import com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; -import com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; -import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; -import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; -import com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; -import com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; -import com.google.privacy.dlp.v2.Value; -import com.google.privacy.dlp.v2.ValueFrequency; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.ProjectTopicName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.stream.Collectors; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -public class RiskAnalysis { - - // [START dlp_numerical_stats] - /** - * Calculate numerical statistics for a column in a BigQuery table using the DLP API. - * - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param columnName The name of the column to analyze, which must contain only numerical data. - * @param topicId The name of the Pub/Sub topic to notify once the job completes - * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job - * completion status. - */ - private static void numericalStatsAnalysis( - String projectId, - String datasetId, - String tableId, - String columnName, - String topicId, - String subscriptionId) - throws Exception { - - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - BigQueryTable bigQueryTable = - BigQueryTable.newBuilder() - .setTableId(tableId) - .setDatasetId(datasetId) - .setProjectId(projectId) - .build(); - - FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); - - NumericalStatsConfig numericalStatsConfig = - NumericalStatsConfig.newBuilder().setField(fieldId).build(); - - PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder().setNumericalStatsConfig(numericalStatsConfig).build(); - - String topicName = String.format("projects/%s/topics/%s", projectId, topicId); - - PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); - - // Create action to publish job status notifications over Google Cloud Pub/Sub - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - RiskAnalysisJobConfig riskAnalysisJobConfig = - RiskAnalysisJobConfig.newBuilder() - .setSourceTable(bigQueryTable) - .setPrivacyMetric(privacyMetric) - .addActions(action) - .build(); - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setRiskJob(riskAnalysisJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - String dlpJobName = dlpJob.getName(); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.newBuilder() - .setProject(projectId) - .setSubscription(subscriptionId) - .build(), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); - } - - // Retrieve completed job status - DlpJob completedJob = - dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); - - System.out.println("Job status: " + completedJob.getState()); - AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); - AnalyzeDataSourceRiskDetails.NumericalStatsResult result = - riskDetails.getNumericalStatsResult(); - - System.out.printf( - "Value range : [%.3f, %.3f]\n", - result.getMinValue().getFloatValue(), result.getMaxValue().getFloatValue()); - - int percent = 1; - Double lastValue = null; - for (Value quantileValue : result.getQuantileValuesList()) { - Double currentValue = quantileValue.getFloatValue(); - if (lastValue == null || !lastValue.equals(currentValue)) { - System.out.printf("Value at %s %% quantile : %.3f", percent, currentValue); - } - lastValue = currentValue; - } - } catch (Exception e) { - System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); - } - } - // [END dlp_numerical_stats] - - // [START dlp_categorical_stats] - /** - * Calculate categorical statistics for a column in a BigQuery table using the DLP API. - * - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param columnName The name of the column to analyze, which need not contain numerical data. - * @param topicId The name of the Pub/Sub topic to notify once the job completes - * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job - * completion status. - */ - private static void categoricalStatsAnalysis( - String projectId, - String datasetId, - String tableId, - String columnName, - String topicId, - String subscriptionId) { - - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); - - CategoricalStatsConfig categoricalStatsConfig = - CategoricalStatsConfig.newBuilder().setField(fieldId).build(); - - BigQueryTable bigQueryTable = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); - - PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder().setCategoricalStatsConfig(categoricalStatsConfig).build(); - - ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); - - PublishToPubSub publishToPubSub = - PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); - - // Create action to publish job status notifications over Google Cloud Pub/Sub - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - RiskAnalysisJobConfig riskAnalysisJobConfig = - RiskAnalysisJobConfig.newBuilder() - .setSourceTable(bigQueryTable) - .setPrivacyMetric(privacyMetric) - .addActions(action) - .build(); - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setRiskJob(riskAnalysisJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - String dlpJobName = dlpJob.getName(); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.newBuilder() - .setProject(projectId) - .setSubscription(subscriptionId) - .build(), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); - } - - // Retrieve completed job status - DlpJob completedJob = - dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); - - System.out.println("Job status: " + completedJob.getState()); - AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); - AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = - riskDetails.getCategoricalStatsResult(); - - for (CategoricalStatsHistogramBucket bucket : - result.getValueFrequencyHistogramBucketsList()) { - System.out.printf( - "Most common value occurs %d time(s).\n", bucket.getValueFrequencyUpperBound()); - System.out.printf( - "Least common value occurs %d time(s).\n", bucket.getValueFrequencyLowerBound()); - for (ValueFrequency valueFrequency : bucket.getBucketValuesList()) { - System.out.printf( - "Value %s occurs %d time(s).\n", - valueFrequency.getValue().toString(), valueFrequency.getCount()); - } - } - } catch (Exception e) { - System.out.println("Error in categoricalStatsAnalysis: " + e.getMessage()); - } - } - // [END dlp_categorical_stats] - - // [START dlp_k_anonymity] - /** - * Calculate k-anonymity for quasi-identifiers in a BigQuery table using the DLP API. - * - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param quasiIds The names of columns that form a composite key ('quasi-identifiers'). - * @param topicId The name of the Pub/Sub topic to notify once the job completes - * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job - * completion status. - */ - private static void calculateKAnonymity( - String projectId, - String datasetId, - String tableId, - List quasiIds, - String topicId, - String subscriptionId) - throws Exception { - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - List quasiIdFields = - quasiIds - .stream() - .map(columnName -> FieldId.newBuilder().setName(columnName).build()) - .collect(Collectors.toList()); - - KAnonymityConfig kanonymityConfig = - KAnonymityConfig.newBuilder().addAllQuasiIds(quasiIdFields).build(); - - BigQueryTable bigQueryTable = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); - - PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder().setKAnonymityConfig(kanonymityConfig).build(); - - String topicName = String.format("projects/%s/topics/%s", projectId, topicId); - - PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); - - // Create action to publish job status notifications over Google Cloud Pub/Sub - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - RiskAnalysisJobConfig riskAnalysisJobConfig = - RiskAnalysisJobConfig.newBuilder() - .setSourceTable(bigQueryTable) - .setPrivacyMetric(privacyMetric) - .addActions(action) - .build(); - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setRiskJob(riskAnalysisJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - String dlpJobName = dlpJob.getName(); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.newBuilder() - .setProject(projectId) - .setSubscription(subscriptionId) - .build(), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); - } - - // Retrieve completed job status - DlpJob completedJob = - dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); - - System.out.println("Job status: " + completedJob.getState()); - AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); - - KAnonymityResult kanonymityResult = riskDetails.getKAnonymityResult(); - for (KAnonymityHistogramBucket result : - kanonymityResult.getEquivalenceClassHistogramBucketsList()) { - System.out.printf( - "Bucket size range: [%d, %d]\n", - result.getEquivalenceClassSizeLowerBound(), result.getEquivalenceClassSizeUpperBound()); - - for (KAnonymityEquivalenceClass bucket : result.getBucketValuesList()) { - List quasiIdValues = - bucket - .getQuasiIdsValuesList() - .stream() - .map(v -> v.toString()) - .collect(Collectors.toList()); - - System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); - System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); - } - } - } catch (Exception e) { - System.out.println("Error in calculateKAnonymity: " + e.getMessage()); - } - } - // [END dlp_k_anonymity] - - // [START dlp_l_diversity] - /** - * Calculate l-diversity for an attribute relative to quasi-identifiers in a BigQuery table. - * - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param sensitiveAttribute The name of the attribute to compare the quasi-ID against - * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). - * @param topicId The name of the Pub/Sub topic to notify once the job completes - * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job - * completion status. - */ - private static void calculateLDiversity( - String projectId, - String datasetId, - String tableId, - String sensitiveAttribute, - List quasiIds, - String topicId, - String subscriptionId) - throws Exception { - - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - FieldId sensitiveAttributeField = FieldId.newBuilder().setName(sensitiveAttribute).build(); - - List quasiIdFields = - quasiIds - .stream() - .map(columnName -> FieldId.newBuilder().setName(columnName).build()) - .collect(Collectors.toList()); - - LDiversityConfig ldiversityConfig = - LDiversityConfig.newBuilder() - .addAllQuasiIds(quasiIdFields) - .setSensitiveAttribute(sensitiveAttributeField) - .build(); - - BigQueryTable bigQueryTable = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); - - PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder().setLDiversityConfig(ldiversityConfig).build(); - - String topicName = String.format("projects/%s/topics/%s", projectId, topicId); - - PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); - - // Create action to publish job status notifications over Google Cloud Pub/Sub - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - RiskAnalysisJobConfig riskAnalysisJobConfig = - RiskAnalysisJobConfig.newBuilder() - .setSourceTable(bigQueryTable) - .setPrivacyMetric(privacyMetric) - .addActions(action) - .build(); - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setRiskJob(riskAnalysisJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - String dlpJobName = dlpJob.getName(); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.newBuilder() - .setProject(projectId) - .setSubscription(subscriptionId) - .build(), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); - } - - // retrieve completed job status - DlpJob completedJob = - dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); - - System.out.println("Job status: " + completedJob.getState()); - AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); - - LDiversityResult ldiversityResult = riskDetails.getLDiversityResult(); - for (LDiversityHistogramBucket result : - ldiversityResult.getSensitiveValueFrequencyHistogramBucketsList()) { - for (LDiversityEquivalenceClass bucket : result.getBucketValuesList()) { - List quasiIdValues = - bucket - .getQuasiIdsValuesList() - .stream() - .map(Value::toString) - .collect(Collectors.toList()); - - System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); - System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); - - for (ValueFrequency valueFrequency : bucket.getTopSensitiveValuesList()) { - System.out.printf( - "\t\tSensitive value %s occurs %d time(s).\n", - valueFrequency.getValue().toString(), valueFrequency.getCount()); - } - } - } - } catch (Exception e) { - System.out.println("Error in calculateLDiversity: " + e.getMessage()); - } - } - // [END dlp_l_diversity] - - // [START dlp_k_map] - /** - * Calculate k-map risk estimation for an attribute relative to quasi-identifiers in a BigQuery - * table. - * - * @param projectId The Google Cloud Platform project ID to run the API call under. - * @param datasetId The BigQuery dataset to analyze. - * @param tableId The BigQuery table to analyze. - * @param quasiIds A set of column names that form a composite key ('quasi-identifiers'). - * @param infoTypes The infoTypes corresponding to each quasi-id column - * @param regionCode An ISO-3166-1 region code specifying the k-map distribution region - * @param topicId The name of the Pub/Sub topic to notify once the job completes - * @param subscriptionId The name of the Pub/Sub subscription to use when listening for job - * completion status. - */ - private static void calculateKMap( - String projectId, - String datasetId, - String tableId, - List quasiIds, - List infoTypes, - String regionCode, - String topicId, - String subscriptionId) - throws Exception { - - // Instantiates a client - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - Iterator quasiIdsIterator = quasiIds.iterator(); - Iterator infoTypesIterator = infoTypes.iterator(); - - if (quasiIds.size() != infoTypes.size()) { - throw new IllegalArgumentException("The numbers of quasi-IDs and infoTypes must be equal!"); - } - - ArrayList taggedFields = new ArrayList(); - - while (quasiIdsIterator.hasNext() || infoTypesIterator.hasNext()) { - taggedFields.add( - TaggedField.newBuilder() - .setField(FieldId.newBuilder().setName(quasiIdsIterator.next()).build()) - .setInfoType(infoTypesIterator.next()) - .build()); - } - - KMapEstimationConfig kmapConfig = - KMapEstimationConfig.newBuilder() - .addAllQuasiIds(taggedFields) - .setRegionCode(regionCode) - .build(); - - BigQueryTable bigQueryTable = - BigQueryTable.newBuilder() - .setProjectId(projectId) - .setDatasetId(datasetId) - .setTableId(tableId) - .build(); - - PrivacyMetric privacyMetric = - PrivacyMetric.newBuilder().setKMapEstimationConfig(kmapConfig).build(); - - String topicName = String.format("projects/%s/topics/%s", projectId, topicId); - - PublishToPubSub publishToPubSub = PublishToPubSub.newBuilder().setTopic(topicName).build(); - - // Create action to publish job status notifications over Google Cloud Pub/Sub - Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); - - RiskAnalysisJobConfig riskAnalysisJobConfig = - RiskAnalysisJobConfig.newBuilder() - .setSourceTable(bigQueryTable) - .setPrivacyMetric(privacyMetric) - .addActions(action) - .build(); - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setRiskJob(riskAnalysisJobConfig) - .build(); - - DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); - String dlpJobName = dlpJob.getName(); - - final SettableApiFuture done = SettableApiFuture.create(); - - // Set up a Pub/Sub subscriber to listen on the job completion status - Subscriber subscriber = - Subscriber.newBuilder( - ProjectSubscriptionName.newBuilder() - .setProject(projectId) - .setSubscription(subscriptionId) - .build(), - (pubsubMessage, ackReplyConsumer) -> { - if (pubsubMessage.getAttributesCount() > 0 - && pubsubMessage.getAttributesMap().get("DlpJobName").equals(dlpJobName)) { - // notify job completion - done.set(true); - ackReplyConsumer.ack(); - } - }) - .build(); - subscriber.startAsync(); - - // Wait for job completion semi-synchronously - // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions - try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available - } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); - } - - // retrieve completed job status - DlpJob completedJob = - dlpServiceClient.getDlpJob(GetDlpJobRequest.newBuilder().setName(dlpJobName).build()); - - System.out.println("Job status: " + completedJob.getState()); - AnalyzeDataSourceRiskDetails riskDetails = completedJob.getRiskDetails(); - - KMapEstimationResult kmapResult = riskDetails.getKMapEstimationResult(); - for (KMapEstimationHistogramBucket result : kmapResult.getKMapEstimationHistogramList()) { - - System.out.printf( - "\tAnonymity range: [%d, %d]\n", result.getMinAnonymity(), result.getMaxAnonymity()); - System.out.printf("\tSize: %d\n", result.getBucketSize()); - - for (KMapEstimationQuasiIdValues valueBucket : result.getBucketValuesList()) { - String quasiIdValues = - valueBucket - .getQuasiIdsValuesList() - .stream() - .map( - v -> { - String s = v.toString(); - return s.substring(s.indexOf(':') + 1).trim(); - }) - .collect(Collectors.joining(", ")); - - System.out.printf("\tValues: {%s}\n", quasiIdValues); - System.out.printf( - "\tEstimated k-map anonymity: %d\n", valueBucket.getEstimatedAnonymity()); - } - } - } catch (Exception e) { - System.out.println("Error in calculateKMap: " + e.getMessage()); - } - } - // [END dlp_k_map] - - /** - * Command line application to perform risk analysis using the Data Loss Prevention API. Supported - * data format: BigQuery tables - */ - public static void main(String[] args) throws Exception { - - OptionGroup optionsGroup = new OptionGroup(); - optionsGroup.setRequired(true); - - Option numericalAnalysisOption = new Option("n", "numerical"); - optionsGroup.addOption(numericalAnalysisOption); - - Option categoricalAnalysisOption = new Option("c", "categorical"); - optionsGroup.addOption(categoricalAnalysisOption); - - Option kanonymityOption = new Option("a", "kAnonymity"); - optionsGroup.addOption(kanonymityOption); - - Option kmapOption = new Option("m", "kAnonymity"); - optionsGroup.addOption(kmapOption); - - Option ldiversityOption = new Option("l", "lDiversity"); - optionsGroup.addOption(ldiversityOption); - - Options commandLineOptions = new Options(); - commandLineOptions.addOptionGroup(optionsGroup); - - Option datasetIdOption = Option.builder("datasetId").hasArg(true).required(false).build(); - commandLineOptions.addOption(datasetIdOption); - - Option tableIdOption = Option.builder("tableId").hasArg(true).required(false).build(); - commandLineOptions.addOption(tableIdOption); - - Option projectIdOption = Option.builder("projectId").hasArg(true).required(false).build(); - commandLineOptions.addOption(projectIdOption); - - Option topicIdOption = Option.builder("topicId").hasArg(true).required(false).build(); - commandLineOptions.addOption(topicIdOption); - - Option subscriptionIdOption = - Option.builder("subscriptionId").hasArg(true).required(false).build(); - commandLineOptions.addOption(subscriptionIdOption); - - Option columnNameOption = Option.builder("columnName").hasArg(true).required(false).build(); - commandLineOptions.addOption(columnNameOption); - - Option sensitiveAttributeOption = - Option.builder("sensitiveAttribute").hasArg(true).required(false).build(); - commandLineOptions.addOption(sensitiveAttributeOption); - - Option regionCodeOption = Option.builder("regionCode").hasArg(true).required(false).build(); - commandLineOptions.addOption(regionCodeOption); - - Option quasiIdColumnNamesOption = - Option.builder("quasiIdColumnNames").hasArg(true).required(false).build(); - quasiIdColumnNamesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(quasiIdColumnNamesOption); - - Option infoTypesOption = Option.builder("infoTypes").hasArg(true).required(false).build(); - infoTypesOption.setArgs(Option.UNLIMITED_VALUES); - commandLineOptions.addOption(infoTypesOption); - - CommandLineParser parser = new DefaultParser(); - HelpFormatter formatter = new HelpFormatter(); - CommandLine cmd; - - try { - cmd = parser.parse(commandLineOptions, args); - } catch (ParseException e) { - System.out.println(e.getMessage()); - formatter.printHelp(RiskAnalysis.class.getName(), commandLineOptions); - System.exit(1); - return; - } - - String datasetId = cmd.getOptionValue(datasetIdOption.getOpt()); - String tableId = cmd.getOptionValue(tableIdOption.getOpt()); - // use default project id when project id is not specified - String projectId = - cmd.getOptionValue(projectIdOption.getOpt()); - - String regionCode = cmd.getOptionValue(regionCodeOption.getOpt(), "US"); - - String topicId = cmd.getOptionValue(topicIdOption.getOpt()); - String subscriptionId = cmd.getOptionValue(subscriptionIdOption.getOpt()); - - List infoTypesList = Collections.emptyList(); - if (cmd.hasOption(infoTypesOption.getOpt())) { - infoTypesList = new ArrayList<>(); - String[] infoTypes = cmd.getOptionValues(infoTypesOption.getOpt()); - for (String infoType : infoTypes) { - infoTypesList.add(InfoType.newBuilder().setName(infoType).build()); - } - } - - if (cmd.hasOption("n")) { - // numerical stats analysis - String columnName = cmd.getOptionValue(columnNameOption.getOpt()); - numericalStatsAnalysis(projectId, datasetId, tableId, columnName, topicId, subscriptionId); - } else if (cmd.hasOption("c")) { - // categorical stats analysis - String columnName = cmd.getOptionValue(columnNameOption.getOpt()); - categoricalStatsAnalysis(projectId, datasetId, tableId, columnName, topicId, subscriptionId); - } else if (cmd.hasOption("a")) { - // k-anonymity analysis - List quasiIdColumnNames = - Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); - calculateKAnonymity( - projectId, datasetId, tableId, quasiIdColumnNames, topicId, subscriptionId); - } else if (cmd.hasOption("m")) { - // k-map analysis - List quasiIdColumnNames = - Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); - calculateKMap( - projectId, - datasetId, - tableId, - quasiIdColumnNames, - infoTypesList, - regionCode, - topicId, - subscriptionId); - } else if (cmd.hasOption("l")) { - // l-diversity analysis - String sensitiveAttribute = cmd.getOptionValue(sensitiveAttributeOption.getOpt()); - List quasiIdColumnNames = - Arrays.asList(cmd.getOptionValues(quasiIdColumnNamesOption.getOpt())); - calculateLDiversity( - projectId, - datasetId, - tableId, - sensitiveAttribute, - quasiIdColumnNames, - topicId, - subscriptionId); - } - } -} diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java new file mode 100644 index 00000000000..e02253b3cb0 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -0,0 +1,174 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; +// [START dlp_categorical_stats] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.ValueFrequency; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.PubsubMessage; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +class RiskAnalysisCategoricalStats { + + public static void categoricalStatsAnalysis() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datasetId = "your-bigquery-dataset-id"; + String tableId = "your-bigquery-table-id"; + String topicId = "pub-sub-topic"; + String subscriptionId = "pub-sub-subscription"; + categoricalStatsAnalysis(projectId, datasetId, tableId, topicId, subscriptionId); + } + + public static void categoricalStatsAnalysis( + String projectId, String datasetId, String tableId, String topicId, String subscriptionId) + throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Specify the BigQuery table to analyze + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + // The name of the column to analyze, which doesn't need to contain numerical data + String columnName = "Mystery"; + + // Configure the privacy metric for the job + FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); + CategoricalStatsConfig categoricalStatsConfig = + CategoricalStatsConfig.newBuilder().setField(fieldId).build(); + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setCategoricalStatsConfig(categoricalStatsConfig).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the risk analysis job to perform + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + // Build the job creation request to be sent by the client + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + // Send the request to the API using the client + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Build a request to get the completed job + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + + // Retrieve completed job status + DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job status: " + completedJob.getState()); + + // Get the result and parse through and process the information + CategoricalStatsResult result = completedJob.getRiskDetails().getCategoricalStatsResult(); + List histogramBucketList = + result.getValueFrequencyHistogramBucketsList(); + + for (CategoricalStatsHistogramBucket bucket : histogramBucketList) { + long mostCommonFrequency = bucket.getValueFrequencyUpperBound(); + System.out.printf("Most common value occurs %d time(s).\n", mostCommonFrequency); + + long leastCommonFrequency = bucket.getValueFrequencyLowerBound(); + System.out.printf("Least common value occurs %d time(s).\n", leastCommonFrequency); + + for (ValueFrequency valueFrequency : bucket.getBucketValuesList()) { + System.out.printf( + "Value %s occurs %d time(s).\n", + valueFrequency.getValue().toString(), valueFrequency.getCount()); + } + } + } + } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} + +// [END dlp_categorical_stats] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java new file mode 100644 index 00000000000..bd918d92043 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_k_anonymity] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.Value; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.PubsubMessage; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; + +class RiskAnalysisKAnonymity { + + public static void calculateKAnonymity() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datasetId = "your-bigquery-dataset-id"; + String tableId = "your-bigquery-table-id"; + String topicId = "pub-sub-topic"; + String subscriptionId = "pub-sub-subscription"; + calculateKAnonymity(projectId, datasetId, tableId, topicId, subscriptionId); + } + + public static void calculateKAnonymity( + String projectId, String datasetId, String tableId, String topicId, String subscriptionId) + throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Specify the BigQuery table to analyze + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + // These values represent the column names of quasi-identifiers to analyze + List quasiIds = Arrays.asList("Age", "Mystery"); + + // Configure the privacy metric for the job + List quasiIdFields = + quasiIds.stream() + .map(columnName -> FieldId.newBuilder().setName(columnName).build()) + .collect(Collectors.toList()); + KAnonymityConfig kanonymityConfig = + KAnonymityConfig.newBuilder().addAllQuasiIds(quasiIdFields).build(); + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setKAnonymityConfig(kanonymityConfig).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the risk analysis job to perform + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + // Build the request to be sent by the client + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + // Send the request to the API using the client + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Build a request to get the completed job + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + + // Retrieve completed job status + DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job status: " + completedJob.getState()); + + // Get the result and parse through and process the information + KAnonymityResult kanonymityResult = completedJob.getRiskDetails().getKAnonymityResult(); + List histogramBucketList = + kanonymityResult.getEquivalenceClassHistogramBucketsList(); + for (KAnonymityHistogramBucket result : histogramBucketList) { + System.out.printf( + "Bucket size range: [%d, %d]\n", + result.getEquivalenceClassSizeLowerBound(), result.getEquivalenceClassSizeUpperBound()); + + for (KAnonymityEquivalenceClass bucket : result.getBucketValuesList()) { + List quasiIdValues = + bucket.getQuasiIdsValuesList().stream() + .map(Value::toString) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + } + } + } + } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_k_anonymity] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java new file mode 100644 index 00000000000..4d6c4ac18a4 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -0,0 +1,211 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; +// [START dlp_k_map] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; +import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.PubsubMessage; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; + +class RiskAnalysisKMap { + + public static void calculateKMap() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datasetId = "your-bigquery-dataset-id"; + String tableId = "your-bigquery-table-id"; + String topicId = "pub-sub-topic"; + String subscriptionId = "pub-sub-subscription"; + calculateKMap(projectId, datasetId, tableId, topicId, subscriptionId); + } + + public static void calculateKMap( + String projectId, String datasetId, String tableId, String topicId, String subscriptionId) + throws Exception { + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Specify the BigQuery table to analyze + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + // These values represent the column names of quasi-identifiers to analyze + List quasiIds = Arrays.asList("Age", "Gender"); + + // These values represent the info types corresponding to the quasi-identifiers above + List infoTypeNames = Arrays.asList("AGE", "GENDER"); + + // Tag each of the quasiId column names with its corresponding infoType + List infoTypes = + infoTypeNames.stream() + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + if (quasiIds.size() != infoTypes.size()) { + throw new IllegalArgumentException("The numbers of quasi-IDs and infoTypes must be equal!"); + } + + List taggedFields = new ArrayList(); + for (int i = 0; i < quasiIds.size(); i++) { + TaggedField taggedField = + TaggedField.newBuilder() + .setField(FieldId.newBuilder().setName(quasiIds.get(i)).build()) + .setInfoType(infoTypes.get(i)) + .build(); + taggedFields.add(taggedField); + } + + // The k-map distribution region can be specified by any ISO-3166-1 region code. + String regionCode = "US"; + + // Configure the privacy metric for the job + KMapEstimationConfig kmapConfig = + KMapEstimationConfig.newBuilder() + .addAllQuasiIds(taggedFields) + .setRegionCode(regionCode) + .build(); + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setKMapEstimationConfig(kmapConfig).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the risk analysis job to perform + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + // Build the request to be sent by the client + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + // Send the request to the API using the client + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Build a request to get the completed job + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + + // Retrieve completed job status + DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job status: " + completedJob.getState()); + + // Get the result and parse through and process the information + KMapEstimationResult kmapResult = completedJob.getRiskDetails().getKMapEstimationResult(); + + for (KMapEstimationHistogramBucket result : kmapResult.getKMapEstimationHistogramList()) { + System.out.printf( + "\tAnonymity range: [%d, %d]\n", result.getMinAnonymity(), result.getMaxAnonymity()); + System.out.printf("\tSize: %d\n", result.getBucketSize()); + + for (KMapEstimationQuasiIdValues valueBucket : result.getBucketValuesList()) { + List quasiIdValues = + valueBucket.getQuasiIdsValuesList().stream() + .map( + value -> { + String s = value.toString(); + return s.substring(s.indexOf(':') + 1).trim(); + }) + .collect(Collectors.toList()); + + System.out.printf("\tValues: {%s}\n", String.join(", ", quasiIdValues)); + System.out.printf( + "\tEstimated k-map anonymity: %d\n", valueBucket.getEstimatedAnonymity()); + } + } + } + } + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_k_map] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java new file mode 100644 index 00000000000..a151523260d --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -0,0 +1,191 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_l_diversity] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.Value; +import com.google.privacy.dlp.v2.ValueFrequency; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.PubsubMessage; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.stream.Collectors; + +class RiskAnalysisLDiversity { + + public static void calculateLDiversity() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datasetId = "your-bigquery-dataset-id"; + String tableId = "your-bigquery-table-id"; + String topicId = "pub-sub-topic"; + String subscriptionId = "pub-sub-subscription"; + calculateLDiversity(projectId, datasetId, tableId, topicId, subscriptionId); + } + + public static void calculateLDiversity( + String projectId, String datasetId, String tableId, String topicId, String subscriptionId) + throws Exception { + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Specify the BigQuery table to analyze + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setProjectId(projectId) + .setDatasetId(datasetId) + .setTableId(tableId) + .build(); + + // These values represent the column names of quasi-identifiers to analyze + List quasiIds = Arrays.asList("Age", "Mystery"); + + // This value represents the column name to compare the quasi-identifiers against + String sensitiveAttribute = "Name"; + + // Configure the privacy metric for the job + FieldId sensitiveAttributeField = FieldId.newBuilder().setName(sensitiveAttribute).build(); + List quasiIdFields = + quasiIds.stream() + .map(columnName -> FieldId.newBuilder().setName(columnName).build()) + .collect(Collectors.toList()); + LDiversityConfig ldiversityConfig = + LDiversityConfig.newBuilder() + .addAllQuasiIds(quasiIdFields) + .setSensitiveAttribute(sensitiveAttributeField) + .build(); + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setLDiversityConfig(ldiversityConfig).build(); + + // Create action to publish job status notifications over Google Cloud Pub/ + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the risk analysis job to perform + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + // Build the request to be sent by the client + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + // Send the request to the API using the client + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Build a request to get the completed job + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + + // Retrieve completed job status + DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job status: " + completedJob.getState()); + + // Get the result and parse through and process the information + LDiversityResult ldiversityResult = completedJob.getRiskDetails().getLDiversityResult(); + List histogramBucketList = + ldiversityResult.getSensitiveValueFrequencyHistogramBucketsList(); + for (LDiversityHistogramBucket result : histogramBucketList) { + for (LDiversityEquivalenceClass bucket : result.getBucketValuesList()) { + List quasiIdValues = + bucket.getQuasiIdsValuesList().stream() + .map(Value::toString) + .collect(Collectors.toList()); + + System.out.println("\tQuasi-ID values: " + String.join(", ", quasiIdValues)); + System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); + + for (ValueFrequency valueFrequency : bucket.getTopSensitiveValuesList()) { + System.out.printf( + "\t\tSensitive value %s occurs %d time(s).\n", + valueFrequency.getValue().toString(), valueFrequency.getCount()); + } + } + } + } + } + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_l_diversity] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java new file mode 100644 index 00000000000..90e5d929dce --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_numerical_stats] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.Action.PublishToPubSub; +import com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.PrivacyMetric; +import com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.Value; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.ProjectTopicName; +import com.google.pubsub.v1.PubsubMessage; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +class RiskAnalysisNumericalStats { + + public static void numericalStatsAnalysis() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String datasetId = "your-bigquery-dataset-id"; + String tableId = "your-bigquery-table-id"; + String topicId = "pub-sub-topic"; + String subscriptionId = "pub-sub-subscription"; + numericalStatsAnalysis(projectId, datasetId, tableId, topicId, subscriptionId); + } + + public static void numericalStatsAnalysis( + String projectId, String datasetId, String tableId, String topicId, String subscriptionId) + throws Exception { + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Specify the BigQuery table to analyze + BigQueryTable bigQueryTable = + BigQueryTable.newBuilder() + .setTableId(tableId) + .setDatasetId(datasetId) + .setProjectId(projectId) + .build(); + + // This represents the name of the column to analyze, which must contain numerical data + String columnName = "Age"; + + // Configure the privacy metric for the job + FieldId fieldId = FieldId.newBuilder().setName(columnName).build(); + NumericalStatsConfig numericalStatsConfig = + NumericalStatsConfig.newBuilder().setField(fieldId).build(); + PrivacyMetric privacyMetric = + PrivacyMetric.newBuilder().setNumericalStatsConfig(numericalStatsConfig).build(); + + // Create action to publish job status notifications over Google Cloud Pub/Sub + ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId); + PublishToPubSub publishToPubSub = + PublishToPubSub.newBuilder().setTopic(topicName.toString()).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the risk analysis job to perform + RiskAnalysisJobConfig riskAnalysisJobConfig = + RiskAnalysisJobConfig.newBuilder() + .setSourceTable(bigQueryTable) + .setPrivacyMetric(privacyMetric) + .addActions(action) + .build(); + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setRiskJob(riskAnalysisJobConfig) + .build(); + + // Send the request to the API using the client + DlpJob dlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions + try { + done.get(1, TimeUnit.MINUTES); + Thread.sleep(500); // Wait for the job to become available + } catch (TimeoutException e) { + System.out.println("Unable to verify job completion."); + } + + // Build a request to get the completed job + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + + // Retrieve completed job status + DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job status: " + completedJob.getState()); + + // Get the result and parse through and process the information + NumericalStatsResult result = completedJob.getRiskDetails().getNumericalStatsResult(); + + System.out.printf( + "Value range : [%.3f, %.3f]\n", + result.getMinValue().getFloatValue(), result.getMaxValue().getFloatValue()); + + int percent = 1; + Double lastValue = null; + for (Value quantileValue : result.getQuantileValuesList()) { + Double currentValue = quantileValue.getFloatValue(); + if (lastValue == null || !lastValue.equals(currentValue)) { + System.out.printf("Value at %s %% quantile : %.3f", percent, currentValue); + } + lastValue = currentValue; + } + } + } + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_numerical_stats] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 5d403dd90a0..7f207d1ef7d 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -36,16 +36,16 @@ public class InspectTests { private ByteArrayOutputStream bout; private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String GCS_PATH = System.getenv("GCS_PATH"); + private static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); + private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); + private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); + private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); // TODO: Update as ENV_VARs - private static final String bucketName = PROJECT_ID + "/dlp"; - private static final String pubSubTopicId = "dlp-tests"; - private static final String pubSubSubscriptionId = "dlp-test"; - private static final String datastoreNamespace = ""; private static final String datastoreKind = "dlp"; - private static final String BIGQUERY_DATASET = "integration_tests_dlp"; private static void requireEnvVar(String varName) { assertNotNull( @@ -57,6 +57,11 @@ private static void requireEnvVar(String varName) { public void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("GCS_PATH"); + requireEnvVar("PUB_SUB_TOPIC"); + requireEnvVar("PUB_SUB_SUBSCRIPTION"); + requireEnvVar("BIGQUERY_DATASET"); + requireEnvVar("BIGQUERY_TABLE"); } @Before @@ -98,8 +103,7 @@ public void testInspectImageFile() { @Test public void testInspectGcsFile() throws InterruptedException, ExecutionException, IOException { - String gcsUri = String.format("gs://%s/test.txt", bucketName); - InspectGcsFile.inspectGcsFile(PROJECT_ID, gcsUri, pubSubTopicId, pubSubSubscriptionId); + InspectGcsFile.inspectGcsFile(PROJECT_ID, GCS_PATH, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertThat(output, containsString("Info type: PHONE_NUMBER")); @@ -110,7 +114,7 @@ public void testInspectGcsFile() throws InterruptedException, ExecutionException public void testInspectDatastoreEntity() throws InterruptedException, ExecutionException, IOException { InspectDatastoreEntity.insepctDatastoreEntity( - PROJECT_ID, datastoreNamespace, datastoreKind, pubSubTopicId, pubSubSubscriptionId); + PROJECT_ID, datastoreNamespace, datastoreKind, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertThat(output, containsString("Info type: PHONE_NUMBER")); @@ -118,10 +122,10 @@ public void testInspectDatastoreEntity() } @Test - public void testInspectBiqQueryTable() + public void testInspectBigQueryTable() throws InterruptedException, ExecutionException, IOException { InspectBigQueryTable.inspectBigQueryTable( - PROJECT_ID, BIGQUERY_DATASET, "harmful", pubSubTopicId, pubSubSubscriptionId); + PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertThat(output, containsString("Info type: PHONE_NUMBER")); diff --git a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java similarity index 53% rename from dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java rename to dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index 0dc18a87b47..d1ca2a848e8 100644 --- a/dlp/snippets/snippets/src/test/java/com/example/dlp/RiskAnalysisIT.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.dlp; +package dlp.snippets; import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertNotNull; @@ -26,67 +26,56 @@ import java.util.regex.Pattern; import org.junit.After; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -// CHECKSTYLE OFF: AbbreviationAsWordInName -public class RiskAnalysisIT { +public class RiskAnalysisTests { - // CHECKSTYLE ON: AbbreviationAsWordInName + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); + private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); + private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); + private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); private ByteArrayOutputStream bout; - private PrintStream out; - private String topicId = "dlp-tests"; - private String subscriptionId = "dlp-test"; + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("PUB_SUB_TOPIC"); + requireEnvVar("PUB_SUB_SUBSCRIPTION"); + requireEnvVar("BIGQUERY_DATASET"); + requireEnvVar("BIGQUERY_TABLE"); + } @Before public void setUp() { bout = new ByteArrayOutputStream(); - out = new PrintStream(bout); - System.setOut(out); - assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS")); - assertNotNull(System.getenv("DLP_DEID_WRAPPED_KEY")); - assertNotNull(System.getenv("DLP_DEID_KEY_NAME")); + System.setOut(new PrintStream(bout)); } @Test public void testNumericalStats() throws Exception { - RiskAnalysis.main( - new String[] { - "-n", - "-datasetId", - "integration_tests_dlp", - "-tableId", - "harmful", - "-columnName", - "Age", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId - }); + RiskAnalysisNumericalStats.numericalStatsAnalysis( + PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertThat(output, containsString("Value at ")); } @Test public void testCategoricalStats() throws Exception { - RiskAnalysis.main( - new String[] { - "-c", - "-datasetId", - "integration_tests_dlp", - "-tableId", - "harmful", - "-columnName", - "Mystery", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId - }); + RiskAnalysisCategoricalStats.categoricalStatsAnalysis( + PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + String output = bout.toString(); assertTrue(Pattern.compile("Most common value occurs \\d time").matcher(output).find()); @@ -95,21 +84,8 @@ public void testCategoricalStats() throws Exception { @Test public void testKAnonymity() throws Exception { - RiskAnalysis.main( - new String[] { - "-a", - "-datasetId", - "integration_tests_dlp", - "-tableId", - "harmful", - "-quasiIdColumnNames", - "Age", - "Mystery", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId - }); + RiskAnalysisKAnonymity.calculateKAnonymity( + PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertTrue(Pattern.compile("Bucket size range: \\[\\d, \\d\\]").matcher(output).find()); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); @@ -118,23 +94,8 @@ public void testKAnonymity() throws Exception { @Test public void testLDiversity() throws Exception { - RiskAnalysis.main( - new String[] { - "-l", - "-datasetId", - "integration_tests_dlp", - "-tableId", - "harmful", - "-sensitiveAttribute", - "Name", - "-quasiIdColumnNames", - "Age", - "Mystery", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId - }); + RiskAnalysisLDiversity.calculateLDiversity( + PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); assertTrue(output.contains("Class size: 1")); @@ -143,26 +104,8 @@ public void testLDiversity() throws Exception { @Test public void testKMap() throws Exception { - RiskAnalysis.main( - new String[] { - "-m", - "-datasetId", - "integration_tests_dlp", - "-tableId", - "harmful", - "-topicId", - topicId, - "-subscriptionId", - subscriptionId, - "-regionCode", - "US", - "-quasiIdColumnNames", - "Age", - "Gender", - "-infoTypes", - "AGE", - "GENDER" - }); + RiskAnalysisKMap.calculateKMap(PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + String output = bout.toString(); assertTrue(Pattern.compile("Anonymity range: \\[\\d, \\d]").matcher(output).find()); From c871b63141227c7259b35b4a30e9dcea22df7870 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Wed, 19 Feb 2020 15:48:13 -0800 Subject: [PATCH 056/406] samples: Fixed Checkstyle Errors for DLP Samples (#2083) --- .../dlp/snippets/DeIdentifyWithDateShift.java | 16 ++ .../java/dlp/snippets/DeIdentifyWithFpe.java | 16 ++ .../dlp/snippets/DeIdentifyWithMasking.java | 16 ++ .../main/java/dlp/snippets/InfoTypesList.java | 65 +++--- .../main/java/dlp/snippets/JobsDelete.java | 55 +++-- .../src/main/java/dlp/snippets/JobsList.java | 59 +++-- .../java/dlp/snippets/ReIdentifyWithFpe.java | 16 ++ .../java/dlp/snippets/RiskAnalysisKMap.java | 1 + .../dlp/snippets/RiskAnalysisLDiversity.java | 1 + .../snippets/RiskAnalysisNumericalStats.java | 1 + .../java/dlp/snippets/TemplatesCreate.java | 87 ++++--- .../java/dlp/snippets/TemplatesDelete.java | 53 ++--- .../main/java/dlp/snippets/TemplatesList.java | 78 +++---- .../java/dlp/snippets/TriggersCreate.java | 168 +++++++------- .../java/dlp/snippets/TriggersDelete.java | 51 +++-- .../main/java/dlp/snippets/TriggersList.java | 70 +++--- .../dlp/snippets/DeIdentificationTests.java | 26 +-- .../java/dlp/snippets/InfoTypesTests.java | 66 +++--- .../test/java/dlp/snippets/InspectTests.java | 5 +- .../src/test/java/dlp/snippets/JobsTests.java | 188 +++++++--------- .../java/dlp/snippets/QuickstartTests.java | 4 +- .../test/java/dlp/snippets/RedactTests.java | 24 +- .../java/dlp/snippets/TemplatesTests.java | 167 +++++++------- .../test/java/dlp/snippets/TriggersTests.java | 212 +++++++++--------- 24 files changed, 731 insertions(+), 714 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java index e243d01e1fd..1e7cf9aca7f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dlp.snippets; // [START dlp_deidentify_date_shift] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java index 6d8146c5b77..a82215fb3b5 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dlp.snippets; // [START dlp_deidentify_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java index dc0d1c57546..1449c635006 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dlp.snippets; // [START dlp_deidentify_masking] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java index 8a0712328ac..e251aa2266d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java @@ -17,43 +17,44 @@ package dlp.snippets; // [START dlp_list_info_types] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.InfoTypeDescription; import com.google.privacy.dlp.v2.ListInfoTypesRequest; import com.google.privacy.dlp.v2.ListInfoTypesResponse; - import java.io.IOException; -import java.util.List; - -public class InfoTypesList { - - // Lists the types of sensitive information the DLP API supports. - public static void listInfoTypes() throws IOException { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpClient = DlpServiceClient.create()) { - - // Construct the request to be sent by the client - ListInfoTypesRequest listInfoTypesRequest = ListInfoTypesRequest.newBuilder() - // Only return infoTypes supported by certain parts of the API. - // Supported filters are "supported_by=INSPECT" and "supported_by=RISK_ANALYSIS" - // Defaults to "supported_by=INSPECT" - .setFilter("supported_by=INSPECT") - // BCP-47 language code for localized infoType friendly names. - // Defaults to "en_US" - .setLanguageCode("en-US").build(); - - // Use the client to send the API request. - ListInfoTypesResponse response = dlpClient.listInfoTypes(listInfoTypesRequest); - - // Parse the response and process the results - System.out.println("Infotypes found:"); - for (InfoTypeDescription infoTypeDescription : response.getInfoTypesList()) { - System.out.println("Name : " + infoTypeDescription.getName()); - System.out.println("Display name : " + infoTypeDescription.getDisplayName()); - } - } + +public class InfoTypesList { + + // Lists the types of sensitive information the DLP API supports. + public static void listInfoTypes() throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpClient = DlpServiceClient.create()) { + + // Construct the request to be sent by the client + ListInfoTypesRequest listInfoTypesRequest = + ListInfoTypesRequest.newBuilder() + // Only return infoTypes supported by certain parts of the API. + // Supported filters are "supported_by=INSPECT" and "supported_by=RISK_ANALYSIS" + // Defaults to "supported_by=INSPECT" + .setFilter("supported_by=INSPECT") + // BCP-47 language code for localized infoType friendly names. + // Defaults to "en_US" + .setLanguageCode("en-US") + .build(); + + // Use the client to send the API request. + ListInfoTypesResponse response = dlpClient.listInfoTypes(listInfoTypesRequest); + + // Parse the response and process the results + System.out.println("Infotypes found:"); + for (InfoTypeDescription infoTypeDescription : response.getInfoTypesList()) { + System.out.println("Name : " + infoTypeDescription.getName()); + System.out.println("Display name : " + infoTypeDescription.getDisplayName()); + } } + } } // [END dlp_list_info_types] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java index 84ff70a395b..d751c8e2cdc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java @@ -21,35 +21,34 @@ import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.DeleteDlpJobRequest; import com.google.privacy.dlp.v2.DlpJobName; - import java.io.IOException; -public class JobsDelete { - public static void deleteJobs() throws IOException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String jobId = "your-job-id"; - deleteJobs(projectId,jobId); - } - - // Deletes a DLP Job with the given jobId - public static void deleteJobs(String projectId, String jobId) throws IOException { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // Construct the complete job name from the projectId and jobId - DlpJobName jobName = DlpJobName.of(projectId, jobId); - - // Construct the job deletion request to be sent by the client. - DeleteDlpJobRequest deleteDlpJobRequest = - DeleteDlpJobRequest.newBuilder().setName(jobName.toString()).build(); - - // Send the job deletion request - dlpServiceClient.deleteDlpJob(deleteDlpJobRequest); - System.out.println("Job deleted successfully."); - } +public class JobsDelete { + public static void deleteJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String jobId = "your-job-id"; + deleteJobs(projectId, jobId); + } + + // Deletes a DLP Job with the given jobId + public static void deleteJobs(String projectId, String jobId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Construct the complete job name from the projectId and jobId + DlpJobName jobName = DlpJobName.of(projectId, jobId); + + // Construct the job deletion request to be sent by the client. + DeleteDlpJobRequest deleteDlpJobRequest = + DeleteDlpJobRequest.newBuilder().setName(jobName.toString()).build(); + + // Send the job deletion request + dlpServiceClient.deleteDlpJob(deleteDlpJobRequest); + System.out.println("Job deleted successfully."); } + } } -// [END dlp_delete_job] \ No newline at end of file +// [END dlp_delete_job] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java index 1b00f840fd3..07d3d6ef0de 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java @@ -23,43 +23,42 @@ import com.google.privacy.dlp.v2.DlpJobType; import com.google.privacy.dlp.v2.ListDlpJobsRequest; import com.google.privacy.dlp.v2.ProjectName; - import java.io.IOException; public class JobsList { - public static void listJobs() throws IOException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - listJobs(projectId); - } + public static void listJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listJobs(projectId); + } - // Lists DLP jobs - public static void listJobs(String projectId) throws IOException { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Lists DLP jobs + public static void listJobs(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // Construct the request to be sent by the client. - // For more info on filters and job types, - // see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list - ListDlpJobsRequest listDlpJobsRequest = - ListDlpJobsRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setFilter("state=DONE") - .setType(DlpJobType.valueOf("INSPECT_JOB")) - .build(); + // Construct the request to be sent by the client. + // For more info on filters and job types, + // see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list + ListDlpJobsRequest listDlpJobsRequest = + ListDlpJobsRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setFilter("state=DONE") + .setType(DlpJobType.valueOf("INSPECT_JOB")) + .build(); - // Send the request to list jobs and process the response - DlpServiceClient.ListDlpJobsPagedResponse response = - dlpServiceClient.listDlpJobs(listDlpJobsRequest); + // Send the request to list jobs and process the response + DlpServiceClient.ListDlpJobsPagedResponse response = + dlpServiceClient.listDlpJobs(listDlpJobsRequest); - System.out.println("DLP jobs found:"); - for (DlpJob dlpJob : response.getPage().getValues()) { - System.out.println(dlpJob.getName() + " -- " + dlpJob.getState()); - } - } + System.out.println("DLP jobs found:"); + for (DlpJob dlpJob : response.getPage().getValues()) { + System.out.println(dlpJob.getName() + " -- " + dlpJob.getState()); + } } + } } -// [END dlp_list_jobs] \ No newline at end of file +// [END dlp_list_jobs] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java index e00df1842fe..8847890c13e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package dlp.snippets; // [START dlp_reidentify_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index 4d6c4ac18a4..556452fd6f8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -193,6 +193,7 @@ public static void calculateKMap( } } } + // handleMessage injects the job and settableFuture into the message reciever interface private static void handleMessage( DlpJob job, diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index a151523260d..3ae4b589cdd 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -173,6 +173,7 @@ public static void calculateLDiversity( } } } + // handleMessage injects the job and settableFuture into the message reciever interface private static void handleMessage( DlpJob job, diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index 90e5d929dce..5094b81b3cf 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -152,6 +152,7 @@ public static void numericalStatsAnalysis( } } } + // handleMessage injects the job and settableFuture into the message reciever interface private static void handleMessage( DlpJob job, diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java index 95ca2a26722..26b037736db 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java @@ -17,69 +17,66 @@ package dlp.snippets; // [START dlp_create_inspect_template] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; import com.google.privacy.dlp.v2.ProjectName; - import java.io.IOException; import java.util.List; -import java.util.stream.Stream; import java.util.stream.Collectors; +import java.util.stream.Stream; class TemplatesCreate { - public static void createInspectTemplate() throws IOException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - createInspectTemplate(projectId); - } + public static void createInspectTemplate() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + createInspectTemplate(projectId); + } - // Creates a template to persist configuration information - public static void createInspectTemplate(String projectId) throws IOException { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // Specify the type of info the inspection will look for. - // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - List infoTypes = - Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") - .map(it -> InfoType.newBuilder().setName(it).build()) - .collect(Collectors.toList()); + // Creates a template to persist configuration information + public static void createInspectTemplate(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); - // Construct the inspection configuration for the template - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); + // Construct the inspection configuration for the template + InspectConfig inspectConfig = InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); - // Optionally set a display name and a description for the template - String displayName = "Inspection Config Template"; - String description = "Save configuration for future inspection jobs"; + // Optionally set a display name and a description for the template + String displayName = "Inspection Config Template"; + String description = "Save configuration for future inspection jobs"; - // Build the template - InspectTemplate inspectTemplate = - InspectTemplate.newBuilder() - .setInspectConfig(inspectConfig) - .setDisplayName(displayName) - .setDescription(description) - .build(); + // Build the template + InspectTemplate inspectTemplate = + InspectTemplate.newBuilder() + .setInspectConfig(inspectConfig) + .setDisplayName(displayName) + .setDescription(description) + .build(); - // Create the request to be sent by the client - CreateInspectTemplateRequest createInspectTemplateRequest = - CreateInspectTemplateRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setInspectTemplate(inspectTemplate) - .build(); + // Create the request to be sent by the client + CreateInspectTemplateRequest createInspectTemplateRequest = + CreateInspectTemplateRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectTemplate(inspectTemplate) + .build(); - // Send the request to the API and process the response - InspectTemplate response = - dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); - System.out.printf("Template created: %s", response.getName()); - } + // Send the request to the API and process the response + InspectTemplate response = + dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); + System.out.printf("Template created: %s", response.getName()); } + } } // [END dlp_create_inspect_template] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java index 3cfc3cb5596..d291c87e6bc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java @@ -17,37 +17,38 @@ package dlp.snippets; // [START dlp_delete_inspect_template] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; - import java.io.IOException; class TemplatesDelete { - public static void deleteInspectTemplate() throws IOException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String templateId = "your-template-id"; - deleteInspectTemplate(projectId, templateId); - } - // Delete an existing template - public static void deleteInspectTemplate(String projectId, String templateId) throws IOException{ - // Construct the template name to be deleted - String templateName = String.format("projects/%s/inspectTemplates/%s", projectId, templateId); - - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // Create delete template request to be sent by the client - DeleteInspectTemplateRequest request = - DeleteInspectTemplateRequest.newBuilder().setName(templateName).build(); - - // Send the request with the client - dlpServiceClient.deleteInspectTemplate(request); - System.out.printf("Deleted template: %s\n", templateName); - } + public static void deleteInspectTemplate() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String templateId = "your-template-id"; + deleteInspectTemplate(projectId, templateId); + } + + // Delete an existing template + public static void deleteInspectTemplate(String projectId, String templateId) throws IOException { + // Construct the template name to be deleted + String templateName = String.format("projects/%s/inspectTemplates/%s", projectId, templateId); + + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Create delete template request to be sent by the client + DeleteInspectTemplateRequest request = + DeleteInspectTemplateRequest.newBuilder().setName(templateName).build(); + + // Send the request with the client + dlpServiceClient.deleteInspectTemplate(request); + System.out.printf("Deleted template: %s\n", templateName); } + } } -// [END dlp_delete_inspect_template] \ No newline at end of file +// [END dlp_delete_inspect_template] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java index 078551d227f..a7217e31713 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java @@ -17,60 +17,60 @@ package dlp.snippets; // [START dlp_list_inspect_templates] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; import com.google.privacy.dlp.v2.ProjectName; - import java.io.IOException; class TemplatesList { - public static void listInspectTemplates() throws IOException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - listInspectTemplates(projectId); - } + public static void listInspectTemplates() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listInspectTemplates(projectId); + } - // Lists all templates associated with a given project - public static void listInspectTemplates(String projectId) throws IOException { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Lists all templates associated with a given project + public static void listInspectTemplates(String projectId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // Create the request to be sent by the client - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setPageSize(1) - .build(); + // Create the request to be sent by the client + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setPageSize(1) + .build(); - // Send the request - ListInspectTemplatesPagedResponse response = dlpServiceClient.listInspectTemplates(request); + // Send the request + ListInspectTemplatesPagedResponse response = dlpServiceClient.listInspectTemplates(request); - // Parse through and process the response - System.out.println("Templates found:"); - for (InspectTemplate template : response.getPage().getResponse().getInspectTemplatesList()) { - System.out.printf("Template name: %s\n", template.getName()); - if (template.getDisplayName() != null) { - System.out.printf("\tDisplay name: %s \n", template.getDisplayName()); - System.out.printf("\tCreate time: %s \n", template.getCreateTime()); - System.out.printf("\tUpdate time: %s \n", template.getUpdateTime()); + // Parse through and process the response + System.out.println("Templates found:"); + for (InspectTemplate template : response.getPage().getResponse().getInspectTemplatesList()) { + System.out.printf("Template name: %s\n", template.getName()); + if (template.getDisplayName() != null) { + System.out.printf("\tDisplay name: %s \n", template.getDisplayName()); + System.out.printf("\tCreate time: %s \n", template.getCreateTime()); + System.out.printf("\tUpdate time: %s \n", template.getUpdateTime()); - // print inspection config - InspectConfig inspectConfig = template.getInspectConfig(); - for (InfoType infoType : inspectConfig.getInfoTypesList()) { - System.out.printf("\tInfoType: %s\n", infoType.getName()); - } - System.out.printf("\tMin likelihood: %s\n", inspectConfig.getMinLikelihood()); - System.out.printf("\tLimits: %s\n", inspectConfig.getLimits().getMaxFindingsPerRequest()); - } - } + // print inspection config + InspectConfig inspectConfig = template.getInspectConfig(); + for (InfoType infoType : inspectConfig.getInfoTypesList()) { + System.out.printf("\tInfoType: %s\n", infoType.getName()); + } + System.out.printf("\tMin likelihood: %s\n", inspectConfig.getMinLikelihood()); + System.out.printf("\tLimits: %s\n", inspectConfig.getLimits().getMaxFindingsPerRequest()); } + } } + } } -// [END dlp_list_inspect_templates] \ No newline at end of file +// [END dlp_list_inspect_templates] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java index 5eceed08ccb..209e9e4dbce 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java @@ -29,96 +29,94 @@ import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; -import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; import com.google.protobuf.Duration; - +import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import java.util.List; -import java.util.ArrayList; - public class TriggersCreate { - public static void createTrigger() throws Exception { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; - createTrigger(projectId, gcsPath); - } - - public static void createTrigger(String projectId, String gcsPath) throws Exception { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()){ - - // Set autoPopulateTimespan to true to scan only new content - boolean autoPopulateTimespan = true; - TimespanConfig timespanConfig = TimespanConfig.newBuilder() - .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan).build(); - - // Specify the GCS file to be inspected. - CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder() - .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(gcsPath)) - .build(); - StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions) - .setTimespanConfig(timespanConfig).build(); - - - // Specify the type of info the inspection will look for. - // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - List infoTypes = - Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") - .map(it -> InfoType.newBuilder().setName(it).build()) - .collect(Collectors.toList()); - - InspectConfig inspectConfig = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); - - // Configure the inspection job we want the service to perform. - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setInspectConfig(inspectConfig) - .setStorageConfig(storageConfig) - .build(); - - // Set scanPeriod to the number of days between scans (minimum: 1 day) - int scanPeriod = 1; - - // Optionally set a display name of max 100 chars and a description of max 250 chars - String displayName = "Daily Scan"; - String description = "A daily inspection for personally identifiable information."; - - // Schedule scan of GCS bucket every scanPeriod number of days (minimum = 1 day) - Duration duration = Duration.newBuilder().setSeconds(scanPeriod * 24 * 3600).build(); - Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); - JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); - JobTrigger jobTrigger = - JobTrigger.newBuilder() - .setInspectJob(inspectJobConfig) - .setDisplayName(displayName) - .setDescription(description) - .setStatus(JobTrigger.Status.HEALTHY) - .addTriggers(trigger) - .build(); - - // Create scan request to be sent by client - CreateJobTriggerRequest createJobTriggerRequest = - CreateJobTriggerRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .setJobTrigger(jobTrigger) - .build(); - - // Send the scan request and process the response - JobTrigger createdJobTrigger = dlpServiceClient.createJobTrigger(createJobTriggerRequest); - - System.out.println("Created Trigger: " + createdJobTrigger.getName()); - System.out.println("Display Name: " + createdJobTrigger.getDisplayName()); - System.out.println("Description: " + createdJobTrigger.getDescription()); - } + public static void createTrigger() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; + createTrigger(projectId, gcsPath); + } + + public static void createTrigger(String projectId, String gcsPath) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Set autoPopulateTimespan to true to scan only new content + boolean autoPopulateTimespan = true; + TimespanConfig timespanConfig = + TimespanConfig.newBuilder() + .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan) + .build(); + + // Specify the GCS file to be inspected. + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(gcsPath)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder() + .setCloudStorageOptions(cloudStorageOptions) + .setTimespanConfig(timespanConfig) + .build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + + InspectConfig inspectConfig = InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); + + // Configure the inspection job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(inspectConfig) + .setStorageConfig(storageConfig) + .build(); + + // Set scanPeriod to the number of days between scans (minimum: 1 day) + int scanPeriod = 1; + + // Optionally set a display name of max 100 chars and a description of max 250 chars + String displayName = "Daily Scan"; + String description = "A daily inspection for personally identifiable information."; + + // Schedule scan of GCS bucket every scanPeriod number of days (minimum = 1 day) + Duration duration = Duration.newBuilder().setSeconds(scanPeriod * 24 * 3600).build(); + Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); + JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); + JobTrigger jobTrigger = + JobTrigger.newBuilder() + .setInspectJob(inspectJobConfig) + .setDisplayName(displayName) + .setDescription(description) + .setStatus(JobTrigger.Status.HEALTHY) + .addTriggers(trigger) + .build(); + + // Create scan request to be sent by client + CreateJobTriggerRequest createJobTriggerRequest = + CreateJobTriggerRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setJobTrigger(jobTrigger) + .build(); + + // Send the scan request and process the response + JobTrigger createdJobTrigger = dlpServiceClient.createJobTrigger(createJobTriggerRequest); + + System.out.println("Created Trigger: " + createdJobTrigger.getName()); + System.out.println("Display Name: " + createdJobTrigger.getDisplayName()); + System.out.println("Description: " + createdJobTrigger.getDescription()); } + } } -// [END dlp_create_trigger] \ No newline at end of file +// [END dlp_create_trigger] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java index 305bf63b481..e569ad98d73 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java @@ -21,33 +21,32 @@ import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; import com.google.privacy.dlp.v2.ProjectJobTriggerName; - class TriggersDelete { - public static void deleteTrigger() throws Exception{ - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String triggerId = "your-trigger-id"; - deleteTrigger(projectId, triggerId); - } - - public static void deleteTrigger(String projectId, String triggerId) throws Exception{ - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - - // Get the full trigger name from the given triggerId and ProjectId - ProjectJobTriggerName triggerName = ProjectJobTriggerName.of(projectId, triggerId); - - // Construct the trigger deletion request to be sent by the client - DeleteJobTriggerRequest deleteJobTriggerRequest = - DeleteJobTriggerRequest.newBuilder().setName(triggerName.toString()).build(); - - // Send the trigger deletion request - dlpServiceClient.deleteJobTrigger(deleteJobTriggerRequest); - System.out.println("Trigger deleted: " + triggerName.toString()); - } + public static void deleteTrigger() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String triggerId = "your-trigger-id"; + deleteTrigger(projectId, triggerId); + } + + public static void deleteTrigger(String projectId, String triggerId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Get the full trigger name from the given triggerId and ProjectId + ProjectJobTriggerName triggerName = ProjectJobTriggerName.of(projectId, triggerId); + + // Construct the trigger deletion request to be sent by the client + DeleteJobTriggerRequest deleteJobTriggerRequest = + DeleteJobTriggerRequest.newBuilder().setName(triggerName.toString()).build(); + + // Send the trigger deletion request + dlpServiceClient.deleteJobTrigger(deleteJobTriggerRequest); + System.out.println("Trigger deleted: " + triggerName.toString()); } + } } -// [END dlp_delete_trigger] \ No newline at end of file +// [END dlp_delete_trigger] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java index 9a2fdc1cfaa..61eb2ae9a0f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -22,45 +22,45 @@ import com.google.privacy.dlp.v2.ListJobTriggersRequest; import com.google.privacy.dlp.v2.ProjectName; - class TriggersList { - public static void listTriggers() throws Exception { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - listTriggers(projectId); - } + public static void listTriggers() throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + listTriggers(projectId); + } - public static void listTriggers(String projectId) throws Exception { - // Initialize client that will be used to send requests. This client only needs to be created - // once, and can be reused for multiple requests. After completing all of your requests, call - // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - // Build the request to be sent by the client - ListJobTriggersRequest listJobTriggersRequest = - ListJobTriggersRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) - .build(); + public static void listTriggers(String projectId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + // Build the request to be sent by the client + ListJobTriggersRequest listJobTriggersRequest = + ListJobTriggersRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .build(); - // Use the client to send the API request. - DlpServiceClient.ListJobTriggersPagedResponse response = - dlpServiceClient.listJobTriggers(listJobTriggersRequest); + // Use the client to send the API request. + DlpServiceClient.ListJobTriggersPagedResponse response = + dlpServiceClient.listJobTriggers(listJobTriggersRequest); - // Parse the response and prpcess the results - System.out.println("DLP triggers found:"); - for (JobTrigger trigger : response.getPage().getValues()) { - System.out.println("Trigger: " + trigger.getName()); - System.out.println("\tCreated: " + trigger.getCreateTime()); - System.out.println("\tUpdated: " + trigger.getUpdateTime()); - if (trigger.getDisplayName() != null) { - System.out.println("\tDisplay name: " + trigger.getDisplayName()); - } - if (trigger.getDescription() != null) { - System.out.println("\tDescription: " + trigger.getDescription()); - } - System.out.println("\tStatus: " + trigger.getStatus()); - System.out.println("\tError count: " + trigger.getErrorsCount()); - }; + // Parse the response and prpcess the results + System.out.println("DLP triggers found:"); + for (JobTrigger trigger : response.getPage().getValues()) { + System.out.println("Trigger: " + trigger.getName()); + System.out.println("\tCreated: " + trigger.getCreateTime()); + System.out.println("\tUpdated: " + trigger.getUpdateTime()); + if (trigger.getDisplayName() != null) { + System.out.println("\tDisplay name: " + trigger.getDisplayName()); + } + if (trigger.getDescription() != null) { + System.out.println("\tDescription: " + trigger.getDescription()); } + System.out.println("\tStatus: " + trigger.getStatus()); + System.out.println("\tError count: " + trigger.getErrorsCount()); + } + ; } + } } -// [END dlp_list_triggers] \ No newline at end of file +// [END dlp_list_triggers] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index e10e536f6f5..b2b00b53210 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -16,11 +16,9 @@ package dlp.snippets; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertNotNull; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -28,21 +26,19 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertNotNull; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class DeIdentificationTests { - private ByteArrayOutputStream bout; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - // TODO: Update as ENV_VARs private static final String bucketName = PROJECT_ID + "/dlp"; - + private ByteArrayOutputStream bout; private String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); private String kmsKeyName = System.getenv("DLP_DEID_KEY_NAME"); @@ -90,7 +86,8 @@ public void testDeIdentifyWithFpe() throws IOException { @Test public void testReIdentifyWithFpe() throws IOException { - ReIdentifyWithFpe.reIdentifyWithFpe(PROJECT_ID, "My SSN is SSN_TOKEN(9):731997681", kmsKeyName, wrappedKey); + ReIdentifyWithFpe.reIdentifyWithFpe( + PROJECT_ID, "My SSN is SSN_TOKEN(9):731997681", kmsKeyName, wrappedKey); String output = bout.toString(); assertThat(output, containsString("Text after re-identification:")); @@ -110,5 +107,4 @@ public void testDeIdentifyWithDateShift() throws IOException { // Clean up test output Files.delete(outputFile); } - } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java index d66366fe716..c056bfcc990 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java @@ -16,6 +16,11 @@ package dlp.snippets; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.hamcrest.CoreMatchers; import org.junit.After; import org.junit.Before; @@ -23,46 +28,39 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - @RunWith(JUnit4.class) - public class InfoTypesTests { - private ByteArrayOutputStream bout; + private ByteArrayOutputStream bout; - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } - @Before - public void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - } + @Before + public void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + } - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } - @Test - public void testListInfoTypes() throws Exception { - InfoTypesList.listInfoTypes(); - String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Name")); - assertThat(output, CoreMatchers.containsString("Display name")); - } + @Test + public void testListInfoTypes() throws Exception { + InfoTypesList.listInfoTypes(); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Name")); + assertThat(output, CoreMatchers.containsString("Display name")); + } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 7f207d1ef7d..a767ed72dbc 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -33,19 +33,16 @@ @RunWith(JUnit4.class) public class InspectTests { - private ByteArrayOutputStream bout; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String GCS_PATH = System.getenv("GCS_PATH"); private static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); - // TODO: Update as ENV_VARs private static final String datastoreNamespace = ""; private static final String datastoreKind = "dlp"; - + private ByteArrayOutputStream bout; private static void requireEnvVar(String varName) { assertNotNull( diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java index fd7ee234196..f2ab301f403 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -16,24 +16,22 @@ package dlp.snippets; -import com.google.common.util.concurrent.SettableFuture; -import com.google.privacy.dlp.v2.Action; -import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + +import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CloudStorageOptions; -import com.google.privacy.dlp.v2.StorageConfig; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; import com.google.privacy.dlp.v2.CreateDlpJobRequest; import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.ProjectName; -import com.google.pubsub.v1.ProjectSubscriptionName; -import com.google.pubsub.v1.PubsubMessage; -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.cloud.pubsub.v1.AckReplyConsumer; -import com.google.cloud.pubsub.v1.MessageReceiver; -import com.google.cloud.pubsub.v1.Subscriber; - +import com.google.privacy.dlp.v2.StorageConfig; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; import org.hamcrest.CoreMatchers; import org.junit.After; import org.junit.Before; @@ -42,95 +40,83 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - @RunWith(JUnit4.class) public class JobsTests { - - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String GCS_PATH = System.getenv("GCS_PATH"); - - - - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - private static DlpJob createJob(String jobId) throws IOException { - try (DlpServiceClient dlp = DlpServiceClient.create()) { - FileSet fileSet = FileSet.newBuilder().setUrl(GCS_PATH).build(); - CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder().setFileSet(fileSet).build(); - StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setStorageConfig(storageConfig) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - - - CreateDlpJobRequest createDlpJobRequest = - CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) - .setInspectJob(inspectJobConfig) - .setJobId(jobId) - .build(); - - return dlp.createDlpJob(createDlpJobRequest); - } - } - - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("GCS_PATH"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testListJobs() throws Exception { - // Call listJobs to print out a list of jobIds - JobsList.listJobs(PROJECT_ID); - String output = bout.toString(); - - // Check that the output contains a list of jobs, or is empty - assertThat(output, CoreMatchers.containsString("DLP jobs found:")); - } - - @Test - public void testDeleteJobs() throws Exception { - // Create a job with a unique UUID to be deleted - String jobId = UUID.randomUUID().toString(); - createJob(jobId); - // Delete the job with the specified ID - JobsDelete.deleteJobs(PROJECT_ID, "i-" + jobId); - String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Job deleted successfully.")); + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String GCS_PATH = System.getenv("GCS_PATH"); + + private ByteArrayOutputStream bout; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + private static DlpJob createJob(String jobId) throws IOException { + try (DlpServiceClient dlp = DlpServiceClient.create()) { + FileSet fileSet = FileSet.newBuilder().setUrl(GCS_PATH).build(); + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder().setFileSet(fileSet).build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setInspectJob(inspectJobConfig) + .setJobId(jobId) + .build(); + + return dlp.createDlpJob(createDlpJobRequest); } + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("GCS_PATH"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testListJobs() throws Exception { + // Call listJobs to print out a list of jobIds + JobsList.listJobs(PROJECT_ID); + String output = bout.toString(); + + // Check that the output contains a list of jobs, or is empty + assertThat(output, CoreMatchers.containsString("DLP jobs found:")); + } + + @Test + public void testDeleteJobs() throws Exception { + // Create a job with a unique UUID to be deleted + String jobId = UUID.randomUUID().toString(); + createJob(jobId); + + // Delete the job with the specified ID + JobsDelete.deleteJobs(PROJECT_ID, "i-" + jobId); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Job deleted successfully.")); + } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java index 488396144b4..b3cac2738a5 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java @@ -33,9 +33,8 @@ @RunWith(JUnit4.class) public class QuickstartTests { - private ByteArrayOutputStream bout; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private ByteArrayOutputStream bout; private static void requireEnvVar(String varName) { assertNotNull( @@ -43,7 +42,6 @@ private static void requireEnvVar(String varName) { System.getenv(varName)); } - @BeforeClass public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 3e50dea73b7..73c08815c47 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -16,12 +16,9 @@ package dlp.snippets; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import static junit.framework.TestCase.assertNotNull; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -29,17 +26,18 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertThat; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class RedactTests { - private ByteArrayOutputStream bout; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private ByteArrayOutputStream bout; private static void requireEnvVar(String varName) { assertNotNull( @@ -47,7 +45,6 @@ private static void requireEnvVar(String varName) { System.getenv(varName)); } - @BeforeClass public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); @@ -78,6 +75,5 @@ public void testRedactImage() { String output = bout.toString(); assertThat(output, containsString("Redacted image written")); - } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java index ec602ae57f9..c4e5a1d700c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java @@ -16,26 +16,24 @@ package dlp.snippets; +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; import com.google.privacy.dlp.v2.ProjectName; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.io.IOException; +import java.io.PrintStream; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Stream; import java.util.stream.Collectors; - +import java.util.stream.Stream; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -44,96 +42,89 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) - public class TemplatesTests { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private ByteArrayOutputStream bout; + private ByteArrayOutputStream bout; + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } + private static InspectTemplate createTemplate() throws IOException { + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + List infoTypes = + Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); - private static InspectTemplate createTemplate() throws IOException{ - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - List infoTypes = - Stream.of("PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER") - .map(it -> InfoType.newBuilder().setName(it).build()) - .collect(Collectors.toList()); - - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); - - InspectTemplate inspectTemplate = - InspectTemplate.newBuilder() - .setInspectConfig(inspectConfig) - .build(); - - CreateInspectTemplateRequest createInspectTemplateRequest = - CreateInspectTemplateRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) - .setInspectTemplate(inspectTemplate) - .build(); - - return dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); - } - } + InspectConfig inspectConfig = InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - } + InspectTemplate inspectTemplate = + InspectTemplate.newBuilder().setInspectConfig(inspectConfig).build(); - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } + CreateInspectTemplateRequest createInspectTemplateRequest = + CreateInspectTemplateRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setInspectTemplate(inspectTemplate) + .build(); - @After - public void tearDown() { - System.setOut(null); - bout.reset(); + return dlpServiceClient.createInspectTemplate(createInspectTemplateRequest); } - - @Test - public void testCreateInspectTemplate() throws Exception { - TemplatesCreate.createInspectTemplate(PROJECT_ID); - String output = bout.toString(); - assertThat(output, containsString("Template created: ")); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateInspectTemplate() throws Exception { + TemplatesCreate.createInspectTemplate(PROJECT_ID); + String output = bout.toString(); + assertThat(output, containsString("Template created: ")); + } + + @Test + public void testListInspectemplate() throws Exception { + TemplatesList.listInspectTemplates(PROJECT_ID); + String output = bout.toString(); + assertThat(output, containsString("Templates found:")); + } + + @Test + public void testDeleteInspectTemplate() throws Exception { + // Create a template to be deleted and extract its ID + InspectTemplate template = createTemplate(); + String templateName = template.getName(); + String templateId; + + Matcher matcher = Pattern.compile("inspectTemplates/").matcher(templateName); + if (matcher.find()) { + templateId = templateName.substring(matcher.end()); + } else { + throw new Exception("Could not extract templateId"); } - @Test - public void testListInspectemplate() throws Exception { - TemplatesList.listInspectTemplates(PROJECT_ID); - String output = bout.toString(); - assertThat(output, containsString("Templates found:")); - } - - @Test - public void testDeleteInspectTemplate() throws Exception { - // Create a template to be deleted and extract its ID - InspectTemplate template = createTemplate(); - String templateName = template.getName(); - String templateId; - - Matcher matcher = Pattern.compile("inspectTemplates/").matcher(templateName); - if (matcher.find()){ - templateId = templateName.substring(matcher.end()); - } else { - throw new Exception("Could not extract templateId"); - } - - // Delete the template with the specified ID - TemplatesDelete.deleteInspectTemplate(PROJECT_ID, templateId); - String output = bout.toString(); - assertThat(output, containsString("Deleted template:")); - } + // Delete the template with the specified ID + TemplatesDelete.deleteInspectTemplate(PROJECT_ID, templateId); + String output = bout.toString(); + assertThat(output, containsString("Deleted template:")); + } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java index 720a1cfb38b..567b516fc9d 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java @@ -16,6 +16,9 @@ package dlp.snippets; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CreateJobTriggerRequest; @@ -23,129 +26,120 @@ import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.JobTrigger; import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.StorageConfig; import com.google.privacy.dlp.v2.Schedule; +import com.google.privacy.dlp.v2.StorageConfig; import com.google.protobuf.Duration; - - +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.hamcrest.CoreMatchers; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; - - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.io.IOException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - - @RunWith(JUnit4.class) public class TriggersTests { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String GCS_PATH = System.getenv("GCS_PATH"); - - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - private static JobTrigger createTrigger() throws IOException { - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { - CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder() - .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(GCS_PATH)) - .build(); - StorageConfig storageConfig = - StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); - - - InspectJobConfig inspectJobConfig = - InspectJobConfig.newBuilder() - .setInspectConfig(InspectConfig.newBuilder().build()) - .setStorageConfig(storageConfig) - .build(); - - Duration duration = Duration.newBuilder().setSeconds(24 * 3600).build(); - Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); - JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); - JobTrigger jobTrigger = - JobTrigger.newBuilder() - .setInspectJob(inspectJobConfig) - .setStatus(JobTrigger.Status.HEALTHY) - .addTriggers(trigger) - .build(); - - CreateJobTriggerRequest createJobTriggerRequest = - CreateJobTriggerRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) - .setJobTrigger(jobTrigger) - .build(); - - return dlpServiceClient.createJobTrigger(createJobTriggerRequest); - } - } - - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("GCS_PATH"); + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String GCS_PATH = System.getenv("GCS_PATH"); + + private ByteArrayOutputStream bout; + + private static void requireEnvVar(String varName) { + assertNotNull( + String.format("Environment variable '%s' must be set to perform these tests.", varName), + System.getenv(varName)); + } + + private static JobTrigger createTrigger() throws IOException { + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(GCS_PATH)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(InspectConfig.newBuilder().build()) + .setStorageConfig(storageConfig) + .build(); + + Duration duration = Duration.newBuilder().setSeconds(24 * 3600).build(); + Schedule schedule = Schedule.newBuilder().setRecurrencePeriodDuration(duration).build(); + JobTrigger.Trigger trigger = JobTrigger.Trigger.newBuilder().setSchedule(schedule).build(); + JobTrigger jobTrigger = + JobTrigger.newBuilder() + .setInspectJob(inspectJobConfig) + .setStatus(JobTrigger.Status.HEALTHY) + .addTriggers(trigger) + .build(); + + CreateJobTriggerRequest createJobTriggerRequest = + CreateJobTriggerRequest.newBuilder() + .setParent(ProjectName.of(PROJECT_ID).toString()) + .setJobTrigger(jobTrigger) + .build(); + + return dlpServiceClient.createJobTrigger(createJobTriggerRequest); } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("GCS_PATH"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void tearDown() { + System.setOut(null); + bout.reset(); + } + + @Test + public void testCreateTrigger() throws Exception { + TriggersCreate.createTrigger(PROJECT_ID, GCS_PATH); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Created Trigger:")); + } + + @Test + public void testListTrigger() throws Exception { + TriggersList.listTriggers(PROJECT_ID); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("DLP triggers found:")); + } + + @Test + public void testDeleteTrigger() throws Exception { + JobTrigger trigger = createTrigger(); + String triggerName = createTrigger().getName(); + String triggerId; + + Matcher matcher = Pattern.compile("jobTriggers/").matcher(triggerName); + if (matcher.find()) { + triggerId = triggerName.substring(matcher.end()); + } else { + throw new Exception("Could not extract triggerID"); } - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test - public void testCreateTrigger() throws Exception { - TriggersCreate.createTrigger(PROJECT_ID, GCS_PATH); - String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Created Trigger:")); - } - - @Test - public void testListTrigger() throws Exception { - TriggersList.listTriggers(PROJECT_ID); - String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("DLP triggers found:")); - } - - @Test - public void testDeleteTrigger() throws Exception { - JobTrigger trigger = createTrigger(); - String triggerName = createTrigger().getName(); - String triggerId; - - Matcher matcher = Pattern.compile("jobTriggers/").matcher(triggerName); - if(matcher.find()) { - triggerId = triggerName.substring(matcher.end()); - } else { - throw new Exception("Could not extract triggerID"); - } - - // Delete the job with the specified ID - TriggersDelete.deleteTrigger(PROJECT_ID, triggerId); - String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Trigger deleted:")); - } + // Delete the job with the specified ID + TriggersDelete.deleteTrigger(PROJECT_ID, triggerId); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Trigger deleted:")); + } } From 8a10d657db5220b36e31fc7e3243ac44ff011317 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Mon, 9 Mar 2020 16:17:59 -0700 Subject: [PATCH 057/406] samples: Fix flaky DLP inspect tests (#2359) * refactored and increased time limit for inspect samples --- .../dlp/snippets/InspectBigQueryTable.java | 62 ++++++++++-------- .../dlp/snippets/InspectDatastoreEntity.java | 63 +++++++++++-------- .../java/dlp/snippets/InspectGcsFile.java | 59 ++++++++++------- 3 files changed, 107 insertions(+), 77 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index 951be74e270..2e7f2a968d9 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -18,11 +18,11 @@ // [START dlp_inspect_bigquery] +import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.AckReplyConsumer; import com.google.cloud.pubsub.v1.MessageReceiver; import com.google.cloud.pubsub.v1.Subscriber; -import com.google.common.util.concurrent.SettableFuture; import com.google.privacy.dlp.v2.Action; import com.google.privacy.dlp.v2.BigQueryOptions; import com.google.privacy.dlp.v2.BigQueryTable; @@ -54,10 +54,9 @@ public static void inspectBigQueryTable() String projectId = "your-project-id"; String bigQueryDatasetId = "your-bigquery-dataset-id"; String bigQueryTableId = "your-bigquery-table-id"; - String pubSubTopicId = "your-pubsub-topic-id"; - String pubSubSubscriptionId = "your-pubsub-subscription-id"; - inspectBigQueryTable( - projectId, bigQueryDatasetId, bigQueryTableId, pubSubTopicId, pubSubSubscriptionId); + String topicId = "your-pubsub-topic-id"; + String subscriptionId = "your-pubsub-subscription-id"; + inspectBigQueryTable(projectId, bigQueryDatasetId, bigQueryTableId, topicId, subscriptionId); } // Inspects a BigQuery Table @@ -65,8 +64,8 @@ public static void inspectBigQueryTable( String projectId, String bigQueryDatasetId, String bigQueryTableId, - String pubSubTopicId, - String pubSubSubscriptionName) + String topicId, + String subscriptionId) throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call @@ -98,7 +97,7 @@ public static void inspectBigQueryTable( InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. - String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); Action.PublishToPubSub publishToPubSub = Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); @@ -119,36 +118,32 @@ public static void inspectBigQueryTable( .build(); // Use the client to send the request. - final DlpJob job = dlp.createDlpJob(createDlpJobRequest); - System.out.println("Job created: " + job.getName()); + final DlpJob dlpJob = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + dlpJob.getName()); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); - // Set up a Pub/Sub subscriber to listen for the job completion status - SettableFuture jobDone = SettableFuture.create(); ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); - MessageReceiver handleMessage = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { - String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); - if (job.getName().equals(messageAttribute)) { - jobDone.set(null); - ackReplyConsumer.ack(); - } else { - ackReplyConsumer.nack(); - } + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); }; - Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); - subscriber.startAsync(); // Let the subscriber listen to messages + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); // Wait for the original job to complete try { - jobDone.get(10, TimeUnit.MINUTES); + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Job was not completed after 10 minutes."); + System.out.println("Job was not completed after 15 minutes."); return; } // Get the latest state of the job from the service - GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); DlpJob completedJob = dlp.getDlpJob(request); // Parse the response and process results. @@ -161,5 +156,20 @@ public static void inspectBigQueryTable( } } } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } } // [END dlp_inspect_bigquery] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index 1d35fd7c34c..ef6810b49b2 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -18,11 +18,11 @@ // [START dlp_inspect_datastore] +import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.AckReplyConsumer; import com.google.cloud.pubsub.v1.MessageReceiver; import com.google.cloud.pubsub.v1.Subscriber; -import com.google.common.util.concurrent.SettableFuture; import com.google.privacy.dlp.v2.Action; import com.google.privacy.dlp.v2.CreateDlpJobRequest; import com.google.privacy.dlp.v2.DatastoreOptions; @@ -55,10 +55,9 @@ public static void insepctDatastoreEntity() String projectId = "your-project-id"; String datastoreNamespace = "your-datastore-namespace"; String datastoreKind = "your-datastore-kind"; - String pubSubTopicId = "your-pubsub-topic-id"; - String pubSubSubscriptionId = "your-pubsub-subscription-id"; - insepctDatastoreEntity( - projectId, datastoreNamespace, datastoreKind, pubSubTopicId, pubSubSubscriptionId); + String topicId = "your-pubsub-topic-id"; + String subscriptionId = "your-pubsub-subscription-id"; + insepctDatastoreEntity(projectId, datastoreNamespace, datastoreKind, topicId, subscriptionId); } // Inspects a Datastore Entity. @@ -66,8 +65,8 @@ public static void insepctDatastoreEntity( String projectId, String datastoreNamespce, String datastoreKind, - String pubSubTopicId, - String pubSubSubscriptionName) + String topicId, + String subscriptionId) throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call @@ -99,7 +98,7 @@ public static void insepctDatastoreEntity( InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. - String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); Action.PublishToPubSub publishToPubSub = Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); @@ -120,37 +119,32 @@ public static void insepctDatastoreEntity( .build(); // Use the client to send the request. - final DlpJob job = dlp.createDlpJob(createDlpJobRequest); - System.out.println("Job created: " + job.getName()); + final DlpJob dlpJob = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + dlpJob.getName()); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); - // Set up a Pub/Sub subscriber to listen for the job completion status - SettableFuture jobDone = SettableFuture.create(); ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); - MessageReceiver handleMessage = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { - String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); - if (job.getName().equals(messageAttribute)) { - jobDone.set(null); - ackReplyConsumer.ack(); - } else { - ackReplyConsumer.nack(); - ; - } + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); }; - Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); - subscriber.startAsync(); // Let the subscriber listen to messages + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); // Wait for the original job to complete try { - jobDone.get(10, TimeUnit.MINUTES); + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Job was not completed after 10 minutes."); + System.out.println("Job was not completed after 15 minutes."); return; } // Get the latest state of the job from the service - GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); DlpJob completedJob = dlp.getDlpJob(request); // Parse the response and process results. @@ -163,5 +157,20 @@ public static void insepctDatastoreEntity( } } } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } } // [END dlp_inspect_datastore] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 1d3d6d571ee..5b9a7a01618 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -17,7 +17,7 @@ package dlp.snippets; // [START dlp_inspect_gcs] - +import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.AckReplyConsumer; import com.google.cloud.pubsub.v1.MessageReceiver; @@ -52,14 +52,14 @@ public static void inspectGcsFile() throws InterruptedException, ExecutionExcept // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/file.txt"; - String pubSubTopicId = "your-pubsub-topic-id"; - String pubSubSubscriptionId = "your-pubsub-subscription-id"; - inspectGcsFile(projectId, gcsUri, pubSubTopicId, pubSubSubscriptionId); + String topicId = "your-pubsub-topic-id"; + String subscriptionId = "your-pubsub-subscription-id"; + inspectGcsFile(projectId, gcsUri, topicId, subscriptionId); } // Inspects a file in a Google Cloud Storage Bucket. public static void inspectGcsFile( - String projectId, String gcsUri, String pubSubTopicId, String pubSubSubscriptionName) + String projectId, String gcsUri, String topicId, String subscriptionId) throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call @@ -84,7 +84,7 @@ public static void inspectGcsFile( InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. - String pubSubTopic = String.format("projects/%s/topics/%s", projectId, pubSubTopicId); + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); Action.PublishToPubSub publishToPubSub = Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); @@ -105,36 +105,32 @@ public static void inspectGcsFile( .build(); // Use the client to send the request. - final DlpJob job = dlp.createDlpJob(createDlpJobRequest); - System.out.println("Job created: " + job.getName()); + final DlpJob dlpJob = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + dlpJob.getName()); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); - // Set up a Pub/Sub subscriber to listen for the job completion status - SettableFuture jobDone = SettableFuture.create(); ProjectSubscriptionName subscriptionName = - ProjectSubscriptionName.of(projectId, pubSubSubscriptionName); - MessageReceiver handleMessage = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { - String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); - if (job.getName().equals(messageAttribute)) { - jobDone.set(null); - ackReplyConsumer.ack(); - } else { - ackReplyConsumer.nack(); - } + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); }; - Subscriber subscriber = Subscriber.newBuilder(subscriptionName, handleMessage).build(); - subscriber.startAsync(); // Let the subscriber listen to messages + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); // Wait for the original job to complete try { - jobDone.get(10, TimeUnit.MINUTES); + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Job was not completed after 10 minutes."); + System.out.println("Job was not completed after 15 minutes."); return; } // Get the latest state of the job from the service - GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(job.getName()).build(); + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); DlpJob completedJob = dlp.getDlpJob(request); // Parse the response and process results. @@ -147,5 +143,20 @@ public static void inspectGcsFile( } } } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } } // [END dlp_inspect_gcs] From 95e64bbd4ce9ccab90c300396965cdf98fe6b6b8 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Fri, 20 Mar 2020 16:29:06 -0700 Subject: [PATCH 058/406] samples: Fix Flaky DLP tests (#2447) * modified tests to cancel job * added delay to tests * added comment --- .../test/java/dlp/snippets/InspectTests.java | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index a767ed72dbc..d42ea7c758a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -20,10 +20,13 @@ import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertNotNull; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -100,31 +103,59 @@ public void testInspectImageFile() { @Test public void testInspectGcsFile() throws InterruptedException, ExecutionException, IOException { + InspectGcsFile.inspectGcsFile(PROJECT_ID, GCS_PATH, TOPIC_ID, SUBSCRIPTION_ID); + // Await job creation + TimeUnit.SECONDS.sleep(3); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Job created: ")); + + // Cancelling the job early to conserve quota + String jobId = output.split("Job created: ")[1].split("\n")[0]; + CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.cancelDlpJob(request); + } } @Test public void testInspectDatastoreEntity() throws InterruptedException, ExecutionException, IOException { + InspectDatastoreEntity.insepctDatastoreEntity( PROJECT_ID, datastoreNamespace, datastoreKind, TOPIC_ID, SUBSCRIPTION_ID); + // Await job creation + TimeUnit.SECONDS.sleep(3); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Job created: ")); + + // Cancelling the job early to conserve quota + String jobId = output.split("Job created: ")[1].split("\n")[0]; + CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.cancelDlpJob(request); + } } @Test public void testInspectBigQueryTable() throws InterruptedException, ExecutionException, IOException { + InspectBigQueryTable.inspectBigQueryTable( PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + // Await job creation + TimeUnit.SECONDS.sleep(3); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Job created: ")); + + // Cancelling the job early to conserve quota + String jobId = output.split("Job created: ")[1].split("\n")[0]; + CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.cancelDlpJob(request); + } } } From dd87e61bd16654f65c98f7b2034990dec402a643 Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Mon, 6 Apr 2020 13:55:36 -0700 Subject: [PATCH 059/406] samples: Add AfterClass method to cleanup DLP Triggers and Templates (#2576) * add AfterClass method to cleanup job triggers and templates * delete only the jobs created in the tests --- .../src/main/java/dlp/snippets/TriggersList.java | 2 +- .../test/java/dlp/snippets/TemplatesTests.java | 16 +++++++++++++++- .../test/java/dlp/snippets/TriggersTests.java | 15 ++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java index 61eb2ae9a0f..cc0c24103c4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -44,7 +44,7 @@ public static void listTriggers(String projectId) throws Exception { DlpServiceClient.ListJobTriggersPagedResponse response = dlpServiceClient.listJobTriggers(listJobTriggersRequest); - // Parse the response and prpcess the results + // Parse the response and process the results System.out.println("DLP triggers found:"); for (JobTrigger trigger : response.getPage().getValues()) { System.out.println("Trigger: " + trigger.getName()); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java index c4e5a1d700c..80216487a84 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java @@ -21,10 +21,13 @@ import static org.junit.Assert.assertThat; import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; import com.google.privacy.dlp.v2.ProjectName; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.junit.After; +import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -88,6 +92,7 @@ public void setUp() { System.setOut(new PrintStream(bout)); } + @After public void tearDown() { System.setOut(null); @@ -99,10 +104,19 @@ public void testCreateInspectTemplate() throws Exception { TemplatesCreate.createInspectTemplate(PROJECT_ID); String output = bout.toString(); assertThat(output, containsString("Template created: ")); + + + // Delete the created template + String templateId = output.split("Template created: ")[1].split("\n")[0]; + DeleteInspectTemplateRequest deleteInspectTemplateRequest = + DeleteInspectTemplateRequest.newBuilder().setName(templateId).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.deleteInspectTemplate(deleteInspectTemplateRequest); + } } @Test - public void testListInspectemplate() throws Exception { + public void testListInspectTemplate() throws Exception { TemplatesList.listInspectTemplates(PROJECT_ID); String output = bout.toString(); assertThat(output, containsString("Templates found:")); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java index 567b516fc9d..f46692523bd 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java @@ -22,9 +22,11 @@ import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; @@ -36,6 +38,7 @@ import java.util.regex.Pattern; import org.hamcrest.CoreMatchers; import org.junit.After; +import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -104,17 +107,27 @@ public void setUp() { System.setOut(new PrintStream(bout)); } + @After public void tearDown() { System.setOut(null); bout.reset(); } + @Test public void testCreateTrigger() throws Exception { TriggersCreate.createTrigger(PROJECT_ID, GCS_PATH); String output = bout.toString(); assertThat(output, CoreMatchers.containsString("Created Trigger:")); + + // Delete the created trigger + String triggerId = output.split("Created Trigger: ")[1].split("\n")[0]; + DeleteJobTriggerRequest deleteJobTriggerRequest = + DeleteJobTriggerRequest.newBuilder().setName(triggerId).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.deleteJobTrigger(deleteJobTriggerRequest); + } } @Test @@ -127,7 +140,7 @@ public void testListTrigger() throws Exception { @Test public void testDeleteTrigger() throws Exception { JobTrigger trigger = createTrigger(); - String triggerName = createTrigger().getName(); + String triggerName = trigger.getName(); String triggerId; Matcher matcher = Pattern.compile("jobTriggers/").matcher(triggerName); From 9d3fe00c2b06283b64d68d721bea6e4f55b0801d Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Mon, 1 Jun 2020 15:28:04 -0700 Subject: [PATCH 060/406] samples: Fix issues with DLP readme and samples used in it (#3008) Fixes some problems with the DLP readme and the examples referenced from it. * Fix `pom.xml` so we produce the expected jar with dependencies. * Fix package names in CLI examples to match what actually exists. * Add notes to README reminding users they need to replace the projectId vars in the samples before running * Make InfoTypesList example runnable * Fix RedactImageFile example to use an existing image file by default, update the readme to match the sample code that exists. Internal bug: b/156125412 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [ ] API's need to be enabled to test (tell us) - [ ] Environment Variables need to be set (ask us to set them) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../src/main/java/dlp/snippets/InfoTypesList.java | 4 ++++ .../main/java/dlp/snippets/RedactImageFile.java | 14 +++++++------- .../src/test/java/dlp/snippets/RedactTests.java | 6 ++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java index e251aa2266d..43a304ead9a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java @@ -26,6 +26,10 @@ public class InfoTypesList { + public static void main(String[] args) throws IOException { + listInfoTypes(); + } + // Lists the types of sensitive information the DLP API supports. public static void listInfoTypes() throws IOException { // Initialize client that will be used to send requests. This client only needs to be created diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index 86413db1619..26e62ec5d87 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -34,14 +34,15 @@ class RedactImageFile { - public static void redactImageFile() { + public static void main(String[] args) { // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String filePath = "path/to/image.png"; - redactImageFile(projectId, filePath); + String projectId = "my-project-id"; + String inputPath = "src/test/resources/test.png"; + String outputPath = "redacted.png"; + redactImageFile(projectId, inputPath, outputPath); } - static void redactImageFile(String projectId, String filePath) { + static void redactImageFile(String projectId, String inputPath, String outputPath) { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -50,7 +51,7 @@ static void redactImageFile(String projectId, String filePath) { ProjectName project = ProjectName.of(projectId); // Specify the content to be inspected. - ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); ByteContentItem byteItem = ByteContentItem.newBuilder().setType(BytesType.IMAGE).setData(fileBytes).build(); @@ -78,7 +79,6 @@ static void redactImageFile(String projectId, String filePath) { RedactImageResponse response = dlp.redactImage(request); // Parse the response and process results. - String outputPath = "redacted.png"; FileOutputStream redacted = new FileOutputStream(outputPath); redacted.write(response.getRedactedImage().toByteArray()); redacted.close(); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 73c08815c47..214dad5baed 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -37,6 +37,8 @@ public class RedactTests { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String INPUT_FILE = "src/test/resources/test.png"; + private static final String OUTPUT_FILE = "redacted.png"; private ByteArrayOutputStream bout; private static void requireEnvVar(String varName) { @@ -65,13 +67,13 @@ public void tearDown() { @After public void cleanUp() throws IOException { - Path outputFile = Paths.get("redacted.png"); + Path outputFile = Paths.get(OUTPUT_FILE); Files.delete(outputFile); } @Test public void testRedactImage() { - RedactImageFile.redactImageFile(PROJECT_ID, "src/test/resources/test.png"); + RedactImageFile.redactImageFile(PROJECT_ID, INPUT_FILE, OUTPUT_FILE); String output = bout.toString(); assertThat(output, containsString("Redacted image written")); From d3dae62bf12eab2f0706449796c6963198bc1325 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Tue, 2 Jun 2020 09:52:57 -0700 Subject: [PATCH 061/406] samples: Add Java code sample for concepts-infotypes (#3012) https://cloud.google.com/dlp/docs/concepts-infotypes --- .../java/dlp/snippets/InspectPhoneNumber.java | 89 +++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 8 ++ 2 files changed, 97 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java new file mode 100644 index 00000000000..fd1588fc100 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_phone_number] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; + +public class InspectPhoneNumber { + + public static void inspectString() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "My name is Gary and my email is gary@example.com"; + inspectString(projectId, textToInspect); + } + + // Inspects the provided text. + public static void inspectString(String projectId, String textToInspect) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ContentItem item = ContentItem.newBuilder() + .setValue(textToInspect) + .build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("PHONE_NUMBER").build(); + + // Construct the configuration for the Inspect request. + InspectConfig config = + InspectConfig.newBuilder() + .setIncludeQuote(true) + .setMinLikelihood(Likelihood.POSSIBLE) + .addInfoTypes(infoType) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_phone_number] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index d42ea7c758a..ca44adad540 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -76,6 +76,14 @@ public void releaseOut() { bout.reset(); } + @Test + public void testInspectPhoneNumber() { + InspectString.inspectString(PROJECT_ID, "My phone number is (415) 555-0890"); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + } + @Test public void testInspectString() { InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); From 94687566c588de0cb7e4ca4a29e7b3b278c07b7a Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Tue, 2 Jun 2020 10:48:05 -0700 Subject: [PATCH 062/406] samples: Create Java code sample for create job (#3017) https://cloud.google.com/dlp/docs/creating-job-triggers Fixes #Create Java code sample for create job > It's a good idea to open an issue first for discussion. > [yes] I have followed Sample Format Guide > [yes] pom.xml parent set to latest shared-configuration > [yes] Appropriate changes to README are included in PR > [nothing new] API's need to be enabled to test (tell us) > [nothing new] Environment Variables need to be set (ask us to set them) > [yes] Tests pass (mvn -P lint clean verify) > (Note- Checkstyle passing is required; Spotbugs, ErrorProne, PMD, etc. ERROR's are advisory only) > [yes] Please merge this PR for me once it is approved --- .../main/java/dlp/snippets/JobsCreate.java | 118 ++++++++++++++++++ .../src/test/java/dlp/snippets/JobsTests.java | 8 ++ 2 files changed, 126 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java new file mode 100644 index 00000000000..95a34bcb0c3 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_create_job] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class JobsCreate { + public static void createJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; + createJobs(projectId, gcsPath); + } + + // Creates a DLP Job + public static void createJobs(String projectId, String gcsPath) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Set autoPopulateTimespan to true to scan only new content + boolean autoPopulateTimespan = true; + TimespanConfig timespanConfig = + TimespanConfig.newBuilder() + .setEnableAutoPopulationOfTimespanConfig(autoPopulateTimespan) + .build(); + + // Specify the GCS file to be inspected. + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(CloudStorageOptions.FileSet.newBuilder().setUrl(gcsPath)) + .build(); + StorageConfig storageConfig = + StorageConfig.newBuilder() + .setCloudStorageOptions(cloudStorageOptions) + .setTimespanConfig(timespanConfig) + .build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + List infoTypes = + Stream.of("EMAIL_ADDRESS", "PERSON_NAME", "LOCATION", "PHONE_NUMBER") + .map(it -> InfoType.newBuilder().setName(it).build()) + .collect(Collectors.toList()); + // The minimum likelihood required before returning a match: + // See: https://cloud.google.com/dlp/docs/likelihood + Likelihood minLikelihood = Likelihood.UNLIKELY; + + // The maximum number of findings to report (0 = server maximum) + InspectConfig.FindingLimits findingLimits = + InspectConfig.FindingLimits.newBuilder().setMaxFindingsPerItem(100).build(); + + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .setMinLikelihood(minLikelihood) + .setLimits(findingLimits) + .build(); + + // Specify the action that is triggered when the job completes. + Action.PublishSummaryToCscc publishSummaryToCscc = + Action.PublishSummaryToCscc.getDefaultInstance(); + Action action = Action.newBuilder().setPublishSummaryToCscc(publishSummaryToCscc).build(); + + // Configure the inspection job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setInspectConfig(inspectConfig) + .setStorageConfig(storageConfig) + .addActions(action) + .build(); + + // Construct the job creation request to be sent by the client. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Send the job creation request + dlpServiceClient.createDlpJob(createDlpJobRequest); + System.out.println("Job created successfully."); + } + } +} +// [END dlp_create_job] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java index f2ab301f403..bf0c8c26687 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -98,6 +98,14 @@ public void tearDown() { bout.reset(); } + @Test + public void testCreateJobs() throws Exception { + // Call createJobs to create a Dlp job from project id and gcs path. + JobsCreate.createJobs(PROJECT_ID, GCS_PATH); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Job created successfully.")); + } + @Test public void testListJobs() throws Exception { // Call listJobs to print out a list of jobIds From f2982583e46327485889900d4cba1641390a5e24 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Tue, 2 Jun 2020 13:27:42 -0700 Subject: [PATCH 063/406] samples: Create Java code sample for omit email address (#3020) --- .../InspectStringWithExclusionDict.java | 121 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 14 ++ 2 files changed, 135 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java new file mode 100644 index 00000000000..d8e657499ba --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_with_exclusion_dict] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class InspectStringWithExclusionDict { + + public static void inspectStringWithExclusionDict() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Some email addresses: gary@example.com, example@example.com"; + List excludedMatchList = Arrays.asList("example@example.com"); + inspectStringWithExclusionDict(projectId, textToInspect, excludedMatchList); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringWithExclusionDict(String projectId, String textToInspect, + List excludedMatchList) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + List infoTypes = new ArrayList<>(); + for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Exclude matches from the specified excludedMatchList. + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedMatchList))) + .build(); + + // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_string_with_exclusion_dict] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index ca44adad540..4d5f419448c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -16,6 +16,7 @@ package dlp.snippets; +import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertNotNull; @@ -25,6 +26,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; +import java.util.Arrays; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.junit.After; @@ -92,6 +94,18 @@ public void testInspectString() { assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } + + @Test + public void testInspectStringWithExclusionDict() { + InspectStringWithExclusionDict.inspectStringWithExclusionDict(PROJECT_ID, + "Some email addresses: gary@example.com, example@example.com", + Arrays.asList("example@example.com")); + + String output = bout.toString(); + assertThat(output, containsString("gary@example.com")); + assertThat(output, not(containsString("example@example.com"))); + } + @Test public void textInspectTestFile() { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From 5c9ada2263d123bae43fb7d3d0b30f15c87e6c53 Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Wed, 3 Jun 2020 12:57:37 -0700 Subject: [PATCH 064/406] samples: Create Java code sample for get jobs (#3027) * Update JobsTests.java * Add files via upload * Update JobsCreate.java * Update JobsTests.java * Update JobsTests.java * Update JobsTests.java * Update JobsTests.java --- .../main/java/dlp/snippets/JobsCreate.java | 7 +-- .../src/main/java/dlp/snippets/JobsGet.java | 54 +++++++++++++++++++ .../src/test/java/dlp/snippets/JobsTests.java | 31 ++++++++++- 3 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java index 95a34bcb0c3..a0ee308ec1c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java @@ -22,6 +22,7 @@ import com.google.privacy.dlp.v2.Action; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; @@ -109,9 +110,9 @@ public static void createJobs(String projectId, String gcsPath) throws IOExcepti .setInspectJob(inspectJobConfig) .build(); - // Send the job creation request - dlpServiceClient.createDlpJob(createDlpJobRequest); - System.out.println("Job created successfully."); + // Send the job creation request and process the response. + DlpJob createdDlpJob = dlpServiceClient.createDlpJob(createDlpJobRequest); + System.out.println("Job created successfully: " + createdDlpJob.getName()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java new file mode 100644 index 00000000000..7d6ab2e9eb4 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_get_job] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import java.io.IOException; + +public class JobsGet { + public static void getJobs() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String jobId = "your-job-id"; + getJobs(projectId, jobId); + } + + // Gets a DLP Job with the given jobId + public static void getJobs(String projectId, String jobId) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + + // Construct the complete job name from the projectId and jobId + DlpJobName jobName = DlpJobName.of(projectId, jobId); + + // Construct the get job request to be sent by the client. + GetDlpJobRequest getDlpJobRequest = + GetDlpJobRequest.newBuilder().setName(jobName.toString()).build(); + + // Send the get job request + dlpServiceClient.getDlpJob(getDlpJobRequest); + System.out.println("Job got successfully."); + } + } +} +// [END dlp_get_job] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java index bf0c8c26687..555e9e66ab1 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -23,6 +23,7 @@ import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; @@ -103,7 +104,35 @@ public void testCreateJobs() throws Exception { // Call createJobs to create a Dlp job from project id and gcs path. JobsCreate.createJobs(PROJECT_ID, GCS_PATH); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Job created successfully.")); + assertThat(output, CoreMatchers.containsString("Job created successfully:")); + + // Delete the created Dlp Job + String dlpJobName = output.split("Job created successfully: ")[1].split("\n")[0]; + DeleteDlpJobRequest deleteDlpJobRequest = + DeleteDlpJobRequest.newBuilder().setName(dlpJobName).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.deleteDlpJob(deleteDlpJobRequest); + } + } + + @Test + public void testGetJobs() throws Exception { + // Create a job with a unique UUID to be gotten + String jobId = UUID.randomUUID().toString(); + DlpJob createdDlpJob = createJob(jobId); + + // Get the job with the specified ID + JobsGet.getJobs(PROJECT_ID, "i-" + jobId); + String output = bout.toString(); + assertThat(output, CoreMatchers.containsString("Job got successfully.")); + + // Delete the created Dlp Job + String dlpJobName = createdDlpJob.getName(); + DeleteDlpJobRequest deleteDlpJobRequest = + DeleteDlpJobRequest.newBuilder().setName(dlpJobName).build(); + try (DlpServiceClient client = DlpServiceClient.create()) { + client.deleteDlpJob(deleteDlpJobRequest); + } } @Test From 7fa463761fe9f0b61f5147d21627a6ef6429522f Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Wed, 3 Jun 2020 16:36:22 -0700 Subject: [PATCH 065/406] samples: Include locations/global in parent field to fix samples (#3042) * Include locations/global in parent field to fix samples * use LocationName helper --- .../main/java/dlp/snippets/DeIdentifyWithDateShift.java | 4 ++-- .../src/main/java/dlp/snippets/DeIdentifyWithFpe.java | 4 ++-- .../src/main/java/dlp/snippets/DeIdentifyWithMasking.java | 4 ++-- .../src/main/java/dlp/snippets/InspectBigQueryTable.java | 4 ++-- .../main/java/dlp/snippets/InspectDatastoreEntity.java | 4 ++-- .../src/main/java/dlp/snippets/InspectGcsFile.java | 6 +++--- .../src/main/java/dlp/snippets/InspectImageFile.java | 8 +++----- .../src/main/java/dlp/snippets/InspectPhoneNumber.java | 7 ++----- .../src/main/java/dlp/snippets/InspectString.java | 8 +++----- .../java/dlp/snippets/InspectStringWithExclusionDict.java | 7 ++----- .../src/main/java/dlp/snippets/InspectTextFile.java | 8 +++----- .../snippets/src/main/java/dlp/snippets/JobsCreate.java | 4 ++-- .../snippets/src/main/java/dlp/snippets/JobsList.java | 4 ++-- .../snippets/src/main/java/dlp/snippets/QuickStart.java | 4 ++-- .../src/main/java/dlp/snippets/ReIdentifyWithFpe.java | 4 ++-- .../src/main/java/dlp/snippets/RedactImageFile.java | 8 +++----- .../java/dlp/snippets/RiskAnalysisCategoricalStats.java | 4 ++-- .../main/java/dlp/snippets/RiskAnalysisKAnonymity.java | 4 ++-- .../src/main/java/dlp/snippets/RiskAnalysisKMap.java | 4 ++-- .../main/java/dlp/snippets/RiskAnalysisLDiversity.java | 4 ++-- .../java/dlp/snippets/RiskAnalysisNumericalStats.java | 4 ++-- .../src/main/java/dlp/snippets/TemplatesCreate.java | 4 ++-- .../src/main/java/dlp/snippets/TemplatesList.java | 4 ++-- .../src/main/java/dlp/snippets/TriggersCreate.java | 4 ++-- .../snippets/src/main/java/dlp/snippets/TriggersList.java | 5 +++-- .../snippets/src/test/java/dlp/snippets/JobsTests.java | 4 ++-- .../src/test/java/dlp/snippets/TemplatesTests.java | 7 ++----- .../src/test/java/dlp/snippets/TriggersTests.java | 6 ++---- 28 files changed, 62 insertions(+), 80 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java index 1e7cf9aca7f..a096c5cd99d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java @@ -27,8 +27,8 @@ import com.google.privacy.dlp.v2.DeidentifyContentResponse; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RecordTransformations; import com.google.privacy.dlp.v2.Table; import com.google.privacy.dlp.v2.Value; @@ -98,7 +98,7 @@ public static void deIdentifyWithDateShift( // Combine configurations into a request for the service. DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setDeidentifyConfig(deidentifyConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java index a82215fb3b5..7633e91dad7 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java @@ -32,8 +32,8 @@ import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.protobuf.ByteString; import java.io.IOException; import java.util.Arrays; @@ -104,7 +104,7 @@ public static void deIdentifyWithFpe( // Combine configurations into a request for the service. DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(contentItem) .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java index 1449c635006..772ba46bfbf 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java @@ -28,8 +28,8 @@ import com.google.privacy.dlp.v2.InfoTypeTransformations; import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; import java.io.IOException; import java.util.Arrays; @@ -82,7 +82,7 @@ public static void deIdentifyWithMasking(String projectId, String textToDeIdenti // Combine configurations into a request for the service. DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(contentItem) .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index 2e7f2a968d9..fb00640d697 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -34,7 +34,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectDataSourceDetails; import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.StorageConfig; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PubsubMessage; @@ -113,7 +113,7 @@ public static void inspectBigQueryTable( // Create the request for the job configured above. CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectJob(inspectJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index ef6810b49b2..2618c98a857 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -34,8 +34,8 @@ import com.google.privacy.dlp.v2.InspectDataSourceDetails; import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.KindExpression; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PartitionId; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.StorageConfig; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PubsubMessage; @@ -114,7 +114,7 @@ public static void insepctDatastoreEntity( // Create the request for the job configured above. CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectJob(inspectJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 5b9a7a01618..3411381510a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -17,12 +17,12 @@ package dlp.snippets; // [START dlp_inspect_gcs] + import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.AckReplyConsumer; import com.google.cloud.pubsub.v1.MessageReceiver; import com.google.cloud.pubsub.v1.Subscriber; -import com.google.common.util.concurrent.SettableFuture; import com.google.privacy.dlp.v2.Action; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; @@ -34,7 +34,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectDataSourceDetails; import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.StorageConfig; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PubsubMessage; @@ -100,7 +100,7 @@ public static void inspectGcsFile( // Create the request for the job configured above. CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectJob(inspectJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index e4425826ecc..555b3a54408 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -17,6 +17,7 @@ package dlp.snippets; // [START dlp_inspect_image_file] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; import com.google.privacy.dlp.v2.ByteContentItem.BytesType; @@ -26,7 +27,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.FileInputStream; import java.util.ArrayList; @@ -47,9 +48,6 @@ public static void inspectImageFile(String projectId, String filePath) { // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); ByteContentItem byteItem = @@ -70,7 +68,7 @@ public static void inspectImageFile(String projectId, String filePath) { // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java index fd1588fc100..3d9fa6142d8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java @@ -26,7 +26,7 @@ import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; public class InspectPhoneNumber { @@ -43,9 +43,6 @@ public static void inspectString(String projectId, String textToInspect) { // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ContentItem item = ContentItem.newBuilder() .setValue(textToInspect) @@ -66,7 +63,7 @@ public static void inspectString(String projectId, String textToInspect) { // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index f8180b8323d..fcdcea75870 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -17,6 +17,7 @@ package dlp.snippets; // [START dlp_inspect_string] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; import com.google.privacy.dlp.v2.ByteContentItem.BytesType; @@ -26,7 +27,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.util.ArrayList; import java.util.List; @@ -46,9 +47,6 @@ public static void inspectString(String projectId, String textToInspect) { // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteContentItem byteItem = ByteContentItem.newBuilder() @@ -71,7 +69,7 @@ public static void inspectString(String projectId, String textToInspect) { // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java index d8e657499ba..de6a76426b8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -32,8 +32,8 @@ import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.InspectionRule; import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.MatchingType; -import com.google.privacy.dlp.v2.ProjectName; import com.google.protobuf.ByteString; import java.util.ArrayList; import java.util.Arrays; @@ -56,9 +56,6 @@ public static void inspectStringWithExclusionDict(String projectId, String textT // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteContentItem byteItem = ByteContentItem.newBuilder() @@ -98,7 +95,7 @@ public static void inspectStringWithExclusionDict(String projectId, String textT // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index 0050c8de8cd..4520fbee599 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -17,6 +17,7 @@ package dlp.snippets; // [START dlp_inspect_file] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; import com.google.privacy.dlp.v2.ByteContentItem.BytesType; @@ -26,7 +27,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.FileInputStream; import java.util.ArrayList; @@ -47,9 +48,6 @@ public static void inspectTextFile(String projectId, String filePath) { // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteString fileBytes = ByteString.readFrom(new FileInputStream(filePath)); ByteContentItem byteItem = @@ -70,7 +68,7 @@ public static void inspectTextFile(String projectId, String filePath) { // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java index a0ee308ec1c..40775745e6f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java @@ -27,7 +27,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.StorageConfig; import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; import java.io.IOException; @@ -106,7 +106,7 @@ public static void createJobs(String projectId, String gcsPath) throws IOExcepti // Construct the job creation request to be sent by the client. CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectJob(inspectJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java index 07d3d6ef0de..28794d157ac 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java @@ -22,7 +22,7 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.DlpJobType; import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import java.io.IOException; public class JobsList { @@ -45,7 +45,7 @@ public static void listJobs(String projectId) throws IOException { // see https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs/list ListDlpJobsRequest listDlpJobsRequest = ListDlpJobsRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setFilter("state=DONE") .setType(DlpJobType.valueOf("INSPECT_JOB")) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java index 829c864dc93..b4b724deb74 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java @@ -28,7 +28,7 @@ import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.InspectResult; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.IOException; import java.util.List; @@ -84,7 +84,7 @@ public static void quickstart(String projectId) throws IOException { // Create the request from previous configs InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectConfig(inspectConfig) .setItem(contentItem) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java index 8847890c13e..6958ac830f4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java @@ -32,8 +32,8 @@ import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.ReidentifyContentRequest; import com.google.privacy.dlp.v2.ReidentifyContentResponse; import com.google.protobuf.ByteString; @@ -111,7 +111,7 @@ public static void reIdentifyWithFpe( // Combine configurations into a request for the service. ReidentifyContentRequest request = ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(contentItem) .setInspectConfig(inspectConfig) .setReidentifyConfig(reidentifyConfig) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index 26e62ec5d87..bedf40a2c8c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -17,13 +17,14 @@ package dlp.snippets; // [START dlp_redact_image] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; import com.google.privacy.dlp.v2.ByteContentItem.BytesType; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.RedactImageRequest; import com.google.privacy.dlp.v2.RedactImageResponse; import com.google.protobuf.ByteString; @@ -47,9 +48,6 @@ static void redactImageFile(String projectId, String inputPath, String outputPat // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the content to be inspected. ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); ByteContentItem byteItem = @@ -70,7 +68,7 @@ static void redactImageFile(String projectId, String inputPath, String outputPat // Construct the Redact request to be sent by the client. RedactImageRequest request = RedactImageRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setByteItem(byteItem) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index e02253b3cb0..1dfcd615147 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -31,9 +31,9 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrivacyMetric; import com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.privacy.dlp.v2.ValueFrequency; import com.google.pubsub.v1.ProjectSubscriptionName; @@ -97,7 +97,7 @@ public static void categoricalStatsAnalysis( // Build the job creation request to be sent by the client CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setRiskJob(riskAnalysisJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index bd918d92043..708976a2ee1 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -33,9 +33,9 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrivacyMetric; import com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.privacy.dlp.v2.Value; import com.google.pubsub.v1.ProjectSubscriptionName; @@ -105,7 +105,7 @@ public static void calculateKAnonymity( // Build the request to be sent by the client CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setRiskJob(riskAnalysisJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index 556452fd6f8..b98b69360cc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -33,10 +33,10 @@ import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.GetDlpJobRequest; import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrivacyMetric; import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; import com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; @@ -131,7 +131,7 @@ public static void calculateKMap( // Build the request to be sent by the client CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setRiskJob(riskAnalysisJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 3ae4b589cdd..b6244f26a36 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -33,9 +33,9 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrivacyMetric; import com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.privacy.dlp.v2.Value; import com.google.privacy.dlp.v2.ValueFrequency; @@ -113,7 +113,7 @@ public static void calculateLDiversity( // Build the request to be sent by the client CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setRiskJob(riskAnalysisJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index 5094b81b3cf..f6d2123226c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -31,9 +31,9 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrivacyMetric; import com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.privacy.dlp.v2.Value; import com.google.pubsub.v1.ProjectSubscriptionName; @@ -97,7 +97,7 @@ public static void numericalStatsAnalysis( CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setRiskJob(riskAnalysisJobConfig) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java index 26b037736db..e95211ffb9b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java @@ -23,7 +23,7 @@ import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; @@ -68,7 +68,7 @@ public static void createInspectTemplate(String projectId) throws IOException { // Create the request to be sent by the client CreateInspectTemplateRequest createInspectTemplateRequest = CreateInspectTemplateRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setInspectTemplate(inspectTemplate) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java index a7217e31713..cf84347be9a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java @@ -24,7 +24,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import java.io.IOException; class TemplatesList { @@ -45,7 +45,7 @@ public static void listInspectTemplates(String projectId) throws IOException { // Create the request to be sent by the client ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setPageSize(1) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java index 209e9e4dbce..c4b694c199e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java @@ -25,7 +25,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; @@ -106,7 +106,7 @@ public static void createTrigger(String projectId, String gcsPath) throws Except // Create scan request to be sent by client CreateJobTriggerRequest createJobTriggerRequest = CreateJobTriggerRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setJobTrigger(jobTrigger) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java index cc0c24103c4..1f5a211657e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -17,10 +17,11 @@ package dlp.snippets; // [START dlp_list_triggers] + import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.JobTrigger; import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; class TriggersList { public static void listTriggers() throws Exception { @@ -37,7 +38,7 @@ public static void listTriggers(String projectId) throws Exception { // Build the request to be sent by the client ListJobTriggersRequest listJobTriggersRequest = ListJobTriggersRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .build(); // Use the client to send the API request. diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java index 555e9e66ab1..4df20a3d0ff 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -27,7 +27,7 @@ import com.google.privacy.dlp.v2.DlpJob; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.StorageConfig; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -71,7 +71,7 @@ private static DlpJob createJob(String jobId) throws IOException { CreateDlpJobRequest createDlpJobRequest = CreateDlpJobRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) + .setParent(LocationName.of(PROJECT_ID, "global").toString()) .setInspectJob(inspectJobConfig) .setJobId(jobId) .build(); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java index 80216487a84..7a923b862c3 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java @@ -21,14 +21,12 @@ import static org.junit.Assert.assertThat; import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -38,7 +36,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.junit.After; -import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -72,7 +69,7 @@ private static InspectTemplate createTemplate() throws IOException { CreateInspectTemplateRequest createInspectTemplateRequest = CreateInspectTemplateRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) + .setParent(LocationName.of(PROJECT_ID, "global").toString()) .setInspectTemplate(inspectTemplate) .build(); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java index f46692523bd..cf7f32f2ef2 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java @@ -26,8 +26,7 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; import com.google.protobuf.Duration; @@ -38,7 +37,6 @@ import java.util.regex.Pattern; import org.hamcrest.CoreMatchers; import org.junit.After; -import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -86,7 +84,7 @@ private static JobTrigger createTrigger() throws IOException { CreateJobTriggerRequest createJobTriggerRequest = CreateJobTriggerRequest.newBuilder() - .setParent(ProjectName.of(PROJECT_ID).toString()) + .setParent(LocationName.of(PROJECT_ID, "global").toString()) .setJobTrigger(jobTrigger) .build(); From 04ba7524701fe4d9b648d0f53b43ec88ef6de7c9 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 4 Jun 2020 10:00:06 -0700 Subject: [PATCH 066/406] samples: create Java code sample for omit email with specific domain (#3050) Fixes internal bug b/156971890 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../InspectStringWithExclusionRegex.java | 115 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 11 ++ 2 files changed, 126 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java new file mode 100644 index 00000000000..105fcd99057 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_with_exclusion_regex] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.List; + +public class InspectStringWithExclusionRegex { + + public static void inspectStringWithExclusionRegex() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Some email addresses: gary@example.com, bob@example.org"; + String excludedRegex = ".+@example.com"; + inspectStringWithExclusionRegex(projectId, textToInspect, excludedRegex); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringWithExclusionRegex(String projectId, String textToInspect, + String excludedRegex) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + List infoTypes = new ArrayList<>(); + for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Exclude matches from the specified excludedMatchList. + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .setRegex(Regex.newBuilder().setPattern(excludedRegex)) + .build(); + + // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_string_with_exclusion_regex] \ No newline at end of file diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 4d5f419448c..227e7c2863d 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -106,6 +106,17 @@ public void testInspectStringWithExclusionDict() { assertThat(output, not(containsString("example@example.com"))); } + @Test + public void testInspectStringWithExclusionRegex() { + InspectStringWithExclusionRegex.inspectStringWithExclusionRegex(PROJECT_ID, + "Some email addresses: gary@example.com, bob@example.org", + ".+@example.com"); + + String output = bout.toString(); + assertThat(output, containsString("bob@example.org")); + assertThat(output, not(containsString("gary@example.com"))); + } + @Test public void textInspectTestFile() { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From 8c2653f41f8edd0674662a6fae7a1d0c265974d4 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 4 Jun 2020 11:52:08 -0700 Subject: [PATCH 067/406] samples: Create Java code sample for omit finding with substring (#3054) Fixes internal bug b/156966396 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- ...spectStringWithExclusionDictSubstring.java | 119 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 11 ++ 2 files changed, 130 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java new file mode 100644 index 00000000000..aa884b03967 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_with_exclusion_dict_substring] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class InspectStringWithExclusionDictSubstring { + + public static void inspectStringWithExclusionDictSubstring() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Some email addresses: gary@example.com, TEST@example.com"; + List excludedSubstringList = Arrays.asList("TEST"); + inspectStringWithExclusionDictSubstring(projectId, textToInspect, excludedSubstringList); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringWithExclusionDictSubstring(String projectId, String textToInspect, + List excludedSubstringList) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + List infoTypes = new ArrayList<>(); + for (String typeName : new String[]{"EMAIL_ADDRESS", "DOMAIN_NAME", "PHONE_NUMBER", + "PERSON_NAME"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Exclude partial matches from the specified excludedSubstringList. + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .build(); + + // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addAllInfoTypes(infoTypes) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_string_with_exclusion_dict_substring] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 227e7c2863d..ca5e2744d5c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -106,6 +106,17 @@ public void testInspectStringWithExclusionDict() { assertThat(output, not(containsString("example@example.com"))); } + @Test + public void testInspectStringWithExclusionDictSubstring() { + InspectStringWithExclusionDictSubstring.inspectStringWithExclusionDictSubstring(PROJECT_ID, + "Some email addresses: gary@example.com, TEST@example.com", + Arrays.asList("TEST")); + + String output = bout.toString(); + assertThat(output, containsString("gary@example.com")); + assertThat(output, not(containsString("TEST@example.com"))); + } + @Test public void testInspectStringWithExclusionRegex() { InspectStringWithExclusionRegex.inspectStringWithExclusionRegex(PROJECT_ID, From 015dd5c480c56a5dc55da418430f3dbc407d916c Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 4 Jun 2020 15:21:43 -0700 Subject: [PATCH 068/406] samples: Create Java code sample for omit finding with substring using custom detector (#3055) * Add InspectStringCustomExcludingSubstring * add test for InspectStringCustomExcludingSubstring * Fix sample annotation name --- ...InspectStringCustomExcludingSubstring.java | 120 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 12 ++ 2 files changed, 132 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java new file mode 100644 index 00000000000..ecf69fddb9e --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_custom_excluding_substring] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.util.Arrays; +import java.util.List; + +public class InspectStringCustomExcludingSubstring { + + public static void inspectStringCustomExcludingSubstring() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Name: Doe, John. Name: Example, Jimmy"; + String customDetectorPattern = "[A-Z][a-z]{1,15}, [A-Z][a-z]{1,15}"; + List excludedSubstringList = Arrays.asList("Jimmy"); + inspectStringCustomExcludingSubstring(projectId, textToInspect, customDetectorPattern, + excludedSubstringList); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringCustomExcludingSubstring(String projectId, String textToInspect, + String customDetectorPattern, List excludedSubstringList) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + InfoType infoType = InfoType.newBuilder().setName("CUSTOM_NAME_DETECTOR").build(); + CustomInfoType customInfoType = CustomInfoType.newBuilder() + .setInfoType(infoType).setRegex( + Regex.newBuilder().setPattern(customDetectorPattern)).build(); + + // Exclude partial matches from the specified excludedSubstringList. + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .build(); + + // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(infoType) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addCustomInfoTypes(customInfoType) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_string_custom_excluding_substring] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index ca5e2744d5c..766a7fe7063 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -128,6 +128,18 @@ public void testInspectStringWithExclusionRegex() { assertThat(output, not(containsString("gary@example.com"))); } + @Test + public void testInspectStringCustomExcludingSubstring() { + InspectStringCustomExcludingSubstring.inspectStringCustomExcludingSubstring(PROJECT_ID, + "Name: Doe, John. Name: Example, Jimmy", + "[A-Z][a-z]{1,15}, [A-Z][a-z]{1,15}", + Arrays.asList("Jimmy")); + + String output = bout.toString(); + assertThat(output, containsString("Doe, John")); + assertThat(output, not(containsString("Example, Jimmy"))); + } + @Test public void textInspectTestFile() { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From 1836ec8b4b39d2c03255f02eaaf2bf1b9db27226 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 4 Jun 2020 16:40:16 -0700 Subject: [PATCH 069/406] samples: Fix inspect tests (#3049) --- .../test/java/dlp/snippets/InspectTests.java | 48 ++++--------------- 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 766a7fe7063..4c857f028d2 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -24,10 +24,8 @@ import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.CancelDlpJobRequest; import java.io.ByteArrayOutputStream; -import java.io.IOException; import java.io.PrintStream; import java.util.Arrays; -import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; @@ -158,60 +156,30 @@ public void testInspectImageFile() { } @Test - public void testInspectGcsFile() throws InterruptedException, ExecutionException, IOException { - + public void testInspectGcsFile() throws Exception { InspectGcsFile.inspectGcsFile(PROJECT_ID, GCS_PATH, TOPIC_ID, SUBSCRIPTION_ID); - // Await job creation - TimeUnit.SECONDS.sleep(3); String output = bout.toString(); - assertThat(output, containsString("Job created: ")); - - // Cancelling the job early to conserve quota - String jobId = output.split("Job created: ")[1].split("\n")[0]; - CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); - try (DlpServiceClient client = DlpServiceClient.create()) { - client.cancelDlpJob(request); - } + assertThat(output, containsString("Job status: DONE")); } @Test - public void testInspectDatastoreEntity() - throws InterruptedException, ExecutionException, IOException { + public void testInspectDatastoreEntity() throws Exception { InspectDatastoreEntity.insepctDatastoreEntity( PROJECT_ID, datastoreNamespace, datastoreKind, TOPIC_ID, SUBSCRIPTION_ID); - // Await job creation - TimeUnit.SECONDS.sleep(3); String output = bout.toString(); - assertThat(output, containsString("Job created: ")); - - // Cancelling the job early to conserve quota - String jobId = output.split("Job created: ")[1].split("\n")[0]; - CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); - try (DlpServiceClient client = DlpServiceClient.create()) { - client.cancelDlpJob(request); - } + assertThat(output, containsString("Job status: DONE")); } @Test - public void testInspectBigQueryTable() - throws InterruptedException, ExecutionException, IOException { + public void testInspectBigQueryTable() throws Exception { - InspectBigQueryTable.inspectBigQueryTable( - PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); - // Await job creation - TimeUnit.SECONDS.sleep(3); + InspectBigQueryTable + .inspectBigQueryTable(PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); String output = bout.toString(); - assertThat(output, containsString("Job created: ")); - - // Cancelling the job early to conserve quota - String jobId = output.split("Job created: ")[1].split("\n")[0]; - CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder().setName(jobId).build(); - try (DlpServiceClient client = DlpServiceClient.create()) { - client.cancelDlpJob(request); - } + assertThat(output, containsString("Job status: DONE")); } } From 8cb58f8dba3f675ecc1382f833019ffadd12318d Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 4 Jun 2020 19:08:08 -0700 Subject: [PATCH 070/406] samples: Make DLP Java samples exception handling consistent (#3060) Fixes internal bug b/158239329 Also follows up on a comment from @lesv on https://github.com/GoogleCloudPlatform/java-docs-samples/pull/3055 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing New**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing New**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../main/java/dlp/snippets/InspectImageFile.java | 7 +++---- .../java/dlp/snippets/InspectPhoneNumber.java | 7 +++---- .../main/java/dlp/snippets/InspectString.java | 7 +++---- .../InspectStringCustomExcludingSubstring.java | 7 +++---- .../snippets/InspectStringWithExclusionDict.java | 7 +++---- .../InspectStringWithExclusionDictSubstring.java | 7 +++---- .../InspectStringWithExclusionRegex.java | 7 +++---- .../main/java/dlp/snippets/InspectTextFile.java | 7 +++---- .../main/java/dlp/snippets/RedactImageFile.java | 8 ++++---- .../snippets/RiskAnalysisCategoricalStats.java | 7 +++++-- .../dlp/snippets/RiskAnalysisKAnonymity.java | 7 +++++-- .../main/java/dlp/snippets/RiskAnalysisKMap.java | 7 ++++--- .../dlp/snippets/RiskAnalysisLDiversity.java | 7 +++++-- .../dlp/snippets/RiskAnalysisNumericalStats.java | 7 +++++-- .../main/java/dlp/snippets/TriggersCreate.java | 5 +++-- .../main/java/dlp/snippets/TriggersDelete.java | 5 +++-- .../src/main/java/dlp/snippets/TriggersList.java | 5 +++-- .../src/test/java/dlp/snippets/InspectTests.java | 16 ++++++++-------- .../src/test/java/dlp/snippets/RedactTests.java | 2 +- 19 files changed, 70 insertions(+), 62 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 555b3a54408..064a1e07aeb 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -30,12 +30,13 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.FileInputStream; +import java.io.IOException; import java.util.ArrayList; import java.util.List; public class InspectImageFile { - public static void inspectImageFile() { + public static void inspectImageFile() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String filePath = "path/to/image.png"; @@ -43,7 +44,7 @@ public static void inspectImageFile() { } // Inspects the specified image file. - public static void inspectImageFile(String projectId, String filePath) { + public static void inspectImageFile(String projectId, String filePath) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -83,8 +84,6 @@ public static void inspectImageFile(String projectId, String filePath) { System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectImageFile: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java index 3d9fa6142d8..be35395b1c9 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java @@ -27,10 +27,11 @@ import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.Likelihood; import com.google.privacy.dlp.v2.LocationName; +import java.io.IOException; public class InspectPhoneNumber { - public static void inspectString() { + public static void inspectString() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "My name is Gary and my email is gary@example.com"; @@ -38,7 +39,7 @@ public static void inspectString() { } // Inspects the provided text. - public static void inspectString(String projectId, String textToInspect) { + public static void inspectString(String projectId, String textToInspect) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -78,8 +79,6 @@ public static void inspectString(String projectId, String textToInspect) { System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index fcdcea75870..d9d39165236 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -29,12 +29,13 @@ import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.ArrayList; import java.util.List; public class InspectString { - public static void inspectString() { + public static void inspectString() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "My name is Gary and my email is gary@example.com"; @@ -42,7 +43,7 @@ public static void inspectString() { } // Inspects the provided text. - public static void inspectString(String projectId, String textToInspect) { + public static void inspectString(String projectId, String textToInspect) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -84,8 +85,6 @@ public static void inspectString(String projectId, String textToInspect) { System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java index ecf69fddb9e..484b3238ffb 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java @@ -37,12 +37,13 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.MatchingType; import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.Arrays; import java.util.List; public class InspectStringCustomExcludingSubstring { - public static void inspectStringCustomExcludingSubstring() { + public static void inspectStringCustomExcludingSubstring() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Name: Doe, John. Name: Example, Jimmy"; @@ -54,7 +55,7 @@ public static void inspectStringCustomExcludingSubstring() { // Inspects the provided text, avoiding matches specified in the exclusion list. public static void inspectStringCustomExcludingSubstring(String projectId, String textToInspect, - String customDetectorPattern, List excludedSubstringList) { + String customDetectorPattern, List excludedSubstringList) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -112,8 +113,6 @@ public static void inspectStringCustomExcludingSubstring(String projectId, Strin System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java index de6a76426b8..aa61d8b7249 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -35,13 +35,14 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.MatchingType; import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class InspectStringWithExclusionDict { - public static void inspectStringWithExclusionDict() { + public static void inspectStringWithExclusionDict() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, example@example.com"; @@ -51,7 +52,7 @@ public static void inspectStringWithExclusionDict() { // Inspects the provided text, avoiding matches specified in the exclusion list. public static void inspectStringWithExclusionDict(String projectId, String textToInspect, - List excludedMatchList) { + List excludedMatchList) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -110,8 +111,6 @@ public static void inspectStringWithExclusionDict(String projectId, String textT System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java index aa884b03967..6ce64bee5e3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java @@ -35,13 +35,14 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.MatchingType; import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class InspectStringWithExclusionDictSubstring { - public static void inspectStringWithExclusionDictSubstring() { + public static void inspectStringWithExclusionDictSubstring() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, TEST@example.com"; @@ -51,7 +52,7 @@ public static void inspectStringWithExclusionDictSubstring() { // Inspects the provided text, avoiding matches specified in the exclusion list. public static void inspectStringWithExclusionDictSubstring(String projectId, String textToInspect, - List excludedSubstringList) { + List excludedSubstringList) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -111,8 +112,6 @@ public static void inspectStringWithExclusionDictSubstring(String projectId, Str System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java index 105fcd99057..bd6c99b46e0 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java @@ -34,12 +34,13 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.MatchingType; import com.google.protobuf.ByteString; +import java.io.IOException; import java.util.ArrayList; import java.util.List; public class InspectStringWithExclusionRegex { - public static void inspectStringWithExclusionRegex() { + public static void inspectStringWithExclusionRegex() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, bob@example.org"; @@ -49,7 +50,7 @@ public static void inspectStringWithExclusionRegex() { // Inspects the provided text, avoiding matches specified in the exclusion list. public static void inspectStringWithExclusionRegex(String projectId, String textToInspect, - String excludedRegex) { + String excludedRegex) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -107,8 +108,6 @@ public static void inspectStringWithExclusionRegex(String projectId, String text System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectString: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index 4520fbee599..ea9266f183b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -30,12 +30,13 @@ import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.FileInputStream; +import java.io.IOException; import java.util.ArrayList; import java.util.List; public class InspectTextFile { - public static void inspectTextFile() { + public static void inspectTextFile() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String filePath = "path/to/file.txt"; @@ -43,7 +44,7 @@ public static void inspectTextFile() { } // Inspects the specified text file. - public static void inspectTextFile(String projectId, String filePath) { + public static void inspectTextFile(String projectId, String filePath) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -83,8 +84,6 @@ public static void inspectTextFile(String projectId, String filePath) { System.out.println("\tInfo type: " + f.getInfoType().getName()); System.out.println("\tLikelihood: " + f.getLikelihood()); } - } catch (Exception e) { - System.out.println("Error during inspectFile: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index bedf40a2c8c..5d574a4a242 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -30,12 +30,13 @@ import com.google.protobuf.ByteString; import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.IOException; import java.util.ArrayList; import java.util.List; class RedactImageFile { - public static void main(String[] args) { + public static void main(String[] args) throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "my-project-id"; String inputPath = "src/test/resources/test.png"; @@ -43,7 +44,8 @@ public static void main(String[] args) { redactImageFile(projectId, inputPath, outputPath); } - static void redactImageFile(String projectId, String inputPath, String outputPath) { + static void redactImageFile(String projectId, String inputPath, String outputPath) + throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -82,8 +84,6 @@ static void redactImageFile(String projectId, String inputPath, String outputPat redacted.close(); System.out.println("Redacted image written to " + outputPath); - } catch (Exception e) { - System.out.println("Error during inspectFile: \n" + e.toString()); } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index 1dfcd615147..af2a714e484 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -39,13 +39,16 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; import java.util.List; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; class RiskAnalysisCategoricalStats { - public static void categoricalStatsAnalysis() throws Exception { + public static void categoricalStatsAnalysis() + throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; @@ -57,7 +60,7 @@ public static void categoricalStatsAnalysis() throws Exception { public static void categoricalStatsAnalysis( String projectId, String datasetId, String tableId, String topicId, String subscriptionId) - throws Exception { + throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index 708976a2ee1..3ec81caaaed 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -41,15 +41,18 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; import java.util.Arrays; import java.util.List; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; class RiskAnalysisKAnonymity { - public static void calculateKAnonymity() throws Exception { + public static void calculateKAnonymity() + throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; @@ -61,7 +64,7 @@ public static void calculateKAnonymity() throws Exception { public static void calculateKAnonymity( String projectId, String datasetId, String tableId, String topicId, String subscriptionId) - throws Exception { + throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index b98b69360cc..b83f8e460aa 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -41,16 +41,18 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; class RiskAnalysisKMap { - public static void calculateKMap() throws Exception { + public static void calculateKMap() throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; @@ -62,8 +64,7 @@ public static void calculateKMap() throws Exception { public static void calculateKMap( String projectId, String datasetId, String tableId, String topicId, String subscriptionId) - throws Exception { - + throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index b6244f26a36..2de783c1680 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -42,15 +42,18 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; import java.util.Arrays; import java.util.List; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; class RiskAnalysisLDiversity { - public static void calculateLDiversity() throws Exception { + public static void calculateLDiversity() + throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; @@ -62,7 +65,7 @@ public static void calculateLDiversity() throws Exception { public static void calculateLDiversity( String projectId, String datasetId, String tableId, String topicId, String subscriptionId) - throws Exception { + throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index f6d2123226c..b0c4196e49a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -39,12 +39,15 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.ProjectTopicName; import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; class RiskAnalysisNumericalStats { - public static void numericalStatsAnalysis() throws Exception { + public static void numericalStatsAnalysis() + throws InterruptedException, ExecutionException, IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; @@ -56,7 +59,7 @@ public static void numericalStatsAnalysis() throws Exception { public static void numericalStatsAnalysis( String projectId, String datasetId, String tableId, String topicId, String subscriptionId) - throws Exception { + throws ExecutionException, InterruptedException, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java index c4b694c199e..0a01bc82b65 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java @@ -30,20 +30,21 @@ import com.google.privacy.dlp.v2.StorageConfig; import com.google.privacy.dlp.v2.StorageConfig.TimespanConfig; import com.google.protobuf.Duration; +import java.io.IOException; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; public class TriggersCreate { - public static void createTrigger() throws Exception { + public static void createTrigger() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; createTrigger(projectId, gcsPath); } - public static void createTrigger(String projectId, String gcsPath) throws Exception { + public static void createTrigger(String projectId, String gcsPath) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java index e569ad98d73..bb70d029f7a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java @@ -20,17 +20,18 @@ import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; import com.google.privacy.dlp.v2.ProjectJobTriggerName; +import java.io.IOException; class TriggersDelete { - public static void deleteTrigger() throws Exception { + public static void deleteTrigger() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String triggerId = "your-trigger-id"; deleteTrigger(projectId, triggerId); } - public static void deleteTrigger(String projectId, String triggerId) throws Exception { + public static void deleteTrigger(String projectId, String triggerId) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java index 1f5a211657e..30ebfbd6931 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -22,15 +22,16 @@ import com.google.privacy.dlp.v2.JobTrigger; import com.google.privacy.dlp.v2.ListJobTriggersRequest; import com.google.privacy.dlp.v2.LocationName; +import java.io.IOException; class TriggersList { - public static void listTriggers() throws Exception { + public static void listTriggers() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; listTriggers(projectId); } - public static void listTriggers(String projectId) throws Exception { + public static void listTriggers(String projectId) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 4c857f028d2..0f79fa28fbe 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -77,7 +77,7 @@ public void releaseOut() { } @Test - public void testInspectPhoneNumber() { + public void testInspectPhoneNumber() throws Exception { InspectString.inspectString(PROJECT_ID, "My phone number is (415) 555-0890"); String output = bout.toString(); @@ -85,7 +85,7 @@ public void testInspectPhoneNumber() { } @Test - public void testInspectString() { + public void testInspectString() throws Exception { InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); String output = bout.toString(); @@ -94,7 +94,7 @@ public void testInspectString() { @Test - public void testInspectStringWithExclusionDict() { + public void testInspectStringWithExclusionDict() throws Exception { InspectStringWithExclusionDict.inspectStringWithExclusionDict(PROJECT_ID, "Some email addresses: gary@example.com, example@example.com", Arrays.asList("example@example.com")); @@ -105,7 +105,7 @@ public void testInspectStringWithExclusionDict() { } @Test - public void testInspectStringWithExclusionDictSubstring() { + public void testInspectStringWithExclusionDictSubstring() throws Exception { InspectStringWithExclusionDictSubstring.inspectStringWithExclusionDictSubstring(PROJECT_ID, "Some email addresses: gary@example.com, TEST@example.com", Arrays.asList("TEST")); @@ -116,7 +116,7 @@ public void testInspectStringWithExclusionDictSubstring() { } @Test - public void testInspectStringWithExclusionRegex() { + public void testInspectStringWithExclusionRegex() throws Exception { InspectStringWithExclusionRegex.inspectStringWithExclusionRegex(PROJECT_ID, "Some email addresses: gary@example.com, bob@example.org", ".+@example.com"); @@ -127,7 +127,7 @@ public void testInspectStringWithExclusionRegex() { } @Test - public void testInspectStringCustomExcludingSubstring() { + public void testInspectStringCustomExcludingSubstring() throws Exception { InspectStringCustomExcludingSubstring.inspectStringCustomExcludingSubstring(PROJECT_ID, "Name: Doe, John. Name: Example, Jimmy", "[A-Z][a-z]{1,15}, [A-Z][a-z]{1,15}", @@ -139,7 +139,7 @@ public void testInspectStringCustomExcludingSubstring() { } @Test - public void textInspectTestFile() { + public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); String output = bout.toString(); assertThat(output, containsString("Info type: PHONE_NUMBER")); @@ -147,7 +147,7 @@ public void textInspectTestFile() { } @Test - public void testInspectImageFile() { + public void testInspectImageFile() throws Exception { InspectImageFile.inspectImageFile(PROJECT_ID, "src/test/resources/test.png"); String output = bout.toString(); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 214dad5baed..f7822e0853a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -72,7 +72,7 @@ public void cleanUp() throws IOException { } @Test - public void testRedactImage() { + public void testRedactImage() throws Exception { RedactImageFile.redactImageFile(PROJECT_ID, INPUT_FILE, OUTPUT_FILE); String output = bout.toString(); From e8d02adc567173bc919cc3086edd5033c5eb54fe Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Fri, 5 Jun 2020 11:00:13 -0700 Subject: [PATCH 071/406] samples: Create Java code sample for omit names that overlap with custom detector (#3064) Fixes internal bug b/156971892 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../InspectStringCustomOmitOverlap.java | 116 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 13 +- 2 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java new file mode 100644 index 00000000000..ee5abb7811e --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_custom_omit_overlap] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.ExclusionType; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.ExcludeInfoTypes; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class InspectStringCustomOmitOverlap { + + public static void inspectStringCustomOmitOverlap() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Name: Jane Doe. Name: Larry Page."; + inspectStringCustomOmitOverlap(projectId, textToInspect); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringCustomOmitOverlap(String projectId, String textToInspect) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Construct the custom infotype. + CustomInfoType customInfoType = CustomInfoType.newBuilder() + .setInfoType(InfoType.newBuilder().setName("VIP_DETECTOR")) + .setRegex(Regex.newBuilder().setPattern("Larry Page|Sergey Brin")) + .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) + .build(); + + // Exclude matches that also match the custom infotype. + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder().addInfoTypes(customInfoType.getInfoType())) + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .build(); + + // Construct a ruleset that applies the exclusion rule to the PERSON_NAME infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addCustomInfoTypes(customInfoType) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_string_custom_omit_overlap] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 0f79fa28fbe..7043c6cc3d2 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -21,12 +21,9 @@ import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertNotNull; -import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Arrays; -import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -138,6 +135,16 @@ public void testInspectStringCustomExcludingSubstring() throws Exception { assertThat(output, not(containsString("Example, Jimmy"))); } + @Test + public void testInspectStringCustomOmitOverlap() throws Exception { + InspectStringCustomOmitOverlap.inspectStringCustomOmitOverlap(PROJECT_ID, + "Name: Jane Doe. Name: Larry Page."); + + String output = bout.toString(); + assertThat(output, containsString("Jane Doe")); + assertThat(output, not(containsString("Larry Page"))); + } + @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From 188247b4bc451148297de3cd31c0699df1ce8b77 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Fri, 5 Jun 2020 11:38:57 -0700 Subject: [PATCH 072/406] samples: Create Java code sample for omit names that are also an email (#3065) * Create Java code sample for omit names that are also an email * add test annotation dropped during merge --- .../snippets/InspectStringOmitOverlap.java | 117 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 9 ++ 2 files changed, 126 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java new file mode 100644 index 00000000000..8361eb9fbde --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_with_exclusion_dict] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.ExcludeInfoTypes; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class InspectStringOmitOverlap { + + public static void inspectStringOmitOverlap() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "james@example.com"; + inspectStringOmitOverlap(projectId, textToInspect); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringOmitOverlap(String projectId, String textToInspect) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + List infoTypes = new ArrayList<>(); + for (String typeName : new String[]{"PERSON_NAME", "EMAIL_ADDRESS"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Exclude EMAIL_ADDRESS matches + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); + + // Construct a ruleset that applies the exclusion rule to the PERSON_NAME infotype. + // If a PERSON_NAME match overlaps with an EMAIL_ADDRESS match, the PERSON_NAME match will + // be excluded. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_string_with_exclusion_dict] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 7043c6cc3d2..87c83c66df0 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -145,6 +145,15 @@ public void testInspectStringCustomOmitOverlap() throws Exception { assertThat(output, not(containsString("Larry Page"))); } + @Test + public void testInspectStringOmitOverlap() throws Exception { + InspectStringOmitOverlap.inspectStringOmitOverlap(PROJECT_ID, "james@example.com"); + + String output = bout.toString(); + assertThat(output, containsString("EMAIL_ADDRESS")); + assertThat(output, not(containsString("PERSON_NAME"))); + } + @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From fbdbc0d0be126c068a33bcc5bb4bcb2041913571 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Fri, 5 Jun 2020 12:04:10 -0700 Subject: [PATCH 073/406] samples: Create Java code sample for omit domain names that are an email (#3066) Fixes internal bug b/156972858 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../snippets/InspectStringWithoutOverlap.java | 126 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 10 ++ 2 files changed, 136 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java new file mode 100644 index 00000000000..170e54e859d --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java @@ -0,0 +1,126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_with_exclusion_dict] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.ExclusionType; +import com.google.privacy.dlp.v2.ExcludeInfoTypes; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class InspectStringWithoutOverlap { + + public static void inspectStringWithoutOverlap() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "example.com is a domain, james@example.org is an email."; + inspectStringWithoutOverlap(projectId, textToInspect); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringWithoutOverlap(String projectId, String textToInspect) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + List infoTypes = new ArrayList<>(); + for (String typeName : new String[]{"DOMAIN_NAME", "EMAIL_ADDRESS"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + + // Define a custom info type to exclude email addresses + CustomInfoType customInfoType = CustomInfoType.newBuilder() + .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) + .build(); + + // Exclude EMAIL_ADDRESS matches + ExclusionRule exclusionRule = ExclusionRule.newBuilder() + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); + + // Construct a ruleset that applies the exclusion rule to the DOMAIN_NAME infotype. + // If a DOMAIN_NAME match is part of an EMAIL_ADDRESS match, the DOMAIN_NAME match will + // be excluded. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("DOMAIN_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .addCustomInfoTypes(customInfoType) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_string_with_exclusion_dict] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 87c83c66df0..358a44775ac 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -154,6 +154,16 @@ public void testInspectStringOmitOverlap() throws Exception { assertThat(output, not(containsString("PERSON_NAME"))); } + @Test + public void testInspectStringWithoutOverlap() throws Exception { + InspectStringWithoutOverlap.inspectStringWithoutOverlap(PROJECT_ID, + "example.com is a domain, james@example.org is an email."); + + String output = bout.toString(); + assertThat(output, containsString("example.com")); + assertThat(output, not(containsString("example.org"))); + } + @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From 0d84e87f76b531c86a08e8d02933c73a832ab276 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Fri, 5 Jun 2020 17:28:09 -0700 Subject: [PATCH 074/406] samples: Add Java code sample for replacement (#3072) Fixes #issue > It's a good idea to open an issue first for discussion. - [yes] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [yes] `pom.xml` parent set to latest `shared-configuration` - [nothing new] Appropriate changes to README are included in PR - [nothing new] API's need to be enabled to test (tell us) - [nothing new] Environment Variables need to be set (ask us to set them) - [yes] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [yes] Please **merge** this PR for me once it is approved. --- .../snippets/DeIdentifyWithReplacement.java | 98 +++++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 11 +++ 2 files changed, 109 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java new file mode 100644 index 00000000000..c070fefe36d --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_replace] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RedactConfig; +import com.google.privacy.dlp.v2.ReplaceValueConfig; +import com.google.privacy.dlp.v2.Value; + +public class DeIdentifyWithReplacement { + + public static void deIdentifyWithReplacement() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = + "My name is Alicia Abernathy, and my email address is aabernathy@example.com."; + deIdentifyWithReplacement(projectId, textToInspect); + } + + // Inspects the provided text. + public static void deIdentifyWithReplacement(String projectId, String textToRedact) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be inspected. + ContentItem item = ContentItem.newBuilder() + .setValue(textToRedact).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); + InspectConfig inspectConfig = InspectConfig.newBuilder().addInfoTypes(infoType).build(); + // Specify replacement string to be used for the finding. + ReplaceValueConfig replaceValueConfig = ReplaceValueConfig.newBuilder() + .setNewValue(Value.newBuilder().setStringValue("[email-address]").build()) + .build(); + // Define type of deidentification as replacement. + PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() + .setReplaceConfig(replaceValueConfig) + .build(); + // Associate deidentification type with info type. + InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + // Construct the configuration for the Redact request and list all desired transformations. + DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() + .addTransformations(transformation)) + .build(); + + // Construct the Redact request to be sent by the client. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setDeidentifyConfig(redactConfig) + .setInspectConfig(inspectConfig) + .build(); + + // Use the client to send the API request. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Parse the response and process results + System.out.println("Text after redaction: " + response.getItem().getValue()); + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_deidentify_replace] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index b2b00b53210..f451ea90d8a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -107,4 +107,15 @@ public void testDeIdentifyWithDateShift() throws IOException { // Clean up test output Files.delete(outputFile); } + + @Test + public void testDeIdentifyWithReplacement() throws IOException { + DeIdentifyWithReplacement.deIdentifyWithReplacement( + PROJECT_ID, + "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); + + String output = bout.toString(); + assertThat(output, containsString("Text after redaction: " + + "My name is Alicia Abernathy, and my email address is [email-address].")); + } } From c6a335785ef344d2f43779fb4e514e5f010fa7a5 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Fri, 5 Jun 2020 18:24:33 -0700 Subject: [PATCH 075/406] samples: Add Java code samples for image redaction (#3075) * Add Java code samples for image redaction To be linked from https://cloud.google.com/dlp/docs/redacting-sensitive-data-images * Update RedactImageFileAllInfoTypes.java * Update RedactImageFileAllText.java * Update RedactImageFileColoredInfoTypes.java * Update RedactImageFileListedInfoTypes.java --- .../snippets/RedactImageFileAllInfoTypes.java | 72 ++++++++++++ .../dlp/snippets/RedactImageFileAllText.java | 78 +++++++++++++ .../RedactImageFileColoredInfoTypes.java | 108 ++++++++++++++++++ .../RedactImageFileListedInfoTypes.java | 97 ++++++++++++++++ .../test/java/dlp/snippets/RedactTests.java | 53 +++++++-- .../test/resources/sensitive-data-image.jpg | Bin 0 -> 78548 bytes 6 files changed, 401 insertions(+), 7 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java create mode 100644 dlp/snippets/snippets/src/test/resources/sensitive-data-image.jpg diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java new file mode 100644 index 00000000000..c7223fcfdcf --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_redact_image_all_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +class RedactImageFileAllInfoTypes { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/sensitive-data-image.jpeg"; + String outputPath = "sensitive-data-image-redacted.jpeg"; + redactImageFileAllInfoTypes(projectId, inputPath, outputPath); + } + + static void redactImageFileAllInfoTypes(String projectId, String inputPath, String outputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be redacted. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Construct the Redact request to be sent by the client. + // Do not specify the type of info to redact. + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setByteItem(byteItem) + .build(); + + // Use the client to send the API request. + RedactImageResponse response = dlp.redactImage(request); + + // Parse the response and process results. + FileOutputStream redacted = new FileOutputStream(outputPath); + redacted.write(response.getRedactedImage().toByteArray()); + redacted.close(); + System.out.println("Redacted image written to " + outputPath); + } + } +} +// [END dlp_redact_image_all_infotypes] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java new file mode 100644 index 00000000000..c875f2e00db --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_redact_image_all_text] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + +class RedactImageFileAllText { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/sensitive-data-image.jpeg"; + String outputPath = "sensitive-data-image-redacted.jpeg"; + redactImageFileAllText(projectId, inputPath, outputPath); + } + + static void redactImageFileAllText(String projectId, String inputPath, String outputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be redacted. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Enable redaction of all text. + ImageRedactionConfig imageRedactionConfig = + ImageRedactionConfig.newBuilder().setRedactAllText(true).build(); + + // Construct the Redact request to be sent by the client. + // Do not specify the type of info to redact. + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setByteItem(byteItem) + .addImageRedactionConfigs(imageRedactionConfig) + .build(); + + // Use the client to send the API request. + RedactImageResponse response = dlp.redactImage(request); + + // Parse the response and process results. + FileOutputStream redacted = new FileOutputStream(outputPath); + redacted.write(response.getRedactedImage().toByteArray()); + redacted.close(); + System.out.println("Redacted image written to " + outputPath); + } + } +} +// [END dlp_redact_image_all_text] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java new file mode 100644 index 00000000000..fd412ce31db --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_redact_image_colored_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.Color; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +class RedactImageFileColoredInfoTypes { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/test.png"; + String outputPath = "redacted.png"; + redactImageFileColoredInfoTypes(projectId, inputPath, outputPath); + } + + static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be redacted. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Define types of info to redact associate each one with a different color. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + ImageRedactionConfig ssnRedactionConfig = ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("US_SOCIAL_SECURITY_NUMBER").build()) + .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build()) + .build(); + ImageRedactionConfig emailRedactionConfig = ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS").build()) + .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build()) + .build(); + ImageRedactionConfig phoneRedactionConfig = ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("PHONE_NUMBER").build()) + .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build()) + .build(); + + // Create collection of all redact configurations. + List imageRedactionConfigs = + Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig); + + // List types of info to search for. + InspectConfig config = + InspectConfig.newBuilder() + .addAllInfoTypes(imageRedactionConfigs.stream() + .map(ImageRedactionConfig::getInfoType) + .collect(Collectors.toList())) + .build(); + + // Construct the Redact request to be sent by the client. + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setByteItem(byteItem) + .addAllImageRedactionConfigs(imageRedactionConfigs) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + RedactImageResponse response = dlp.redactImage(request); + + // Parse the response and process results. + FileOutputStream redacted = new FileOutputStream(outputPath); + redacted.write(response.getRedactedImage().toByteArray()); + redacted.close(); + System.out.println("Redacted image written to " + outputPath); + + } + } +} +// [END dlp_redact_image_colored_infotypes] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java new file mode 100644 index 00000000000..7c8c8c871c9 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_redact_image_listed_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +class RedactImageFileListedInfoTypes { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/sensitive-data-image.jpeg"; + String outputPath = "sensitive-data-image-redacted.jpeg"; + redactImageFileListedInfoTypes(projectId, inputPath, outputPath); + } + + static void redactImageFileListedInfoTypes(String projectId, String inputPath, String outputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be redacted. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Specify the types of info necessary to redact. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : + new String[] {"US_SOCIAL_SECURITY_NUMBER", "EMAIL_ADDRESS", "PHONE_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + + // Prepare redaction configs. + List imageRedactionConfigs = infoTypes.stream() + .map(infoType -> ImageRedactionConfig.newBuilder().setInfoType(infoType).build()) + .collect(Collectors.toList()); + + // Construct the Redact request to be sent by the client. + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setByteItem(byteItem) + .addAllImageRedactionConfigs(imageRedactionConfigs) + .setInspectConfig(inspectConfig) + .build(); + + // Use the client to send the API request. + RedactImageResponse response = dlp.redactImage(request); + + // Parse the response and process results. + FileOutputStream redacted = new FileOutputStream(outputPath); + redacted.write(response.getRedactedImage().toByteArray()); + redacted.close(); + System.out.println("Redacted image written to " + outputPath); + + } + } +} +// [END dlp_redact_image_listed_infotypes] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index f7822e0853a..af2b453fd64 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -17,14 +17,13 @@ package dlp.snippets; import static junit.framework.TestCase.assertNotNull; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertThat; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.nio.file.Files; -import java.nio.file.Path; import java.nio.file.Paths; import org.junit.After; import org.junit.Before; @@ -37,8 +36,12 @@ public class RedactTests { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String INPUT_FILE = "src/test/resources/test.png"; - private static final String OUTPUT_FILE = "redacted.png"; + private static final String SIMPLE_INPUT_FILE = "src/test/resources/test.png"; + private static final String SIMPLE_OUTPUT_FILE = "redacted.png"; + private static final String DOCUMENT_INPUT_FILE = + "src/test/resources/sensitive-data-image.jpg"; + private static final String DOCUMENT_OUTPUT_FILE = + "sensitive-data-image-redacted.jpg"; private ByteArrayOutputStream bout; private static void requireEnvVar(String varName) { @@ -67,13 +70,49 @@ public void tearDown() { @After public void cleanUp() throws IOException { - Path outputFile = Paths.get(OUTPUT_FILE); - Files.delete(outputFile); + Files.deleteIfExists(Paths.get(SIMPLE_OUTPUT_FILE)); + Files.deleteIfExists(Paths.get(DOCUMENT_OUTPUT_FILE)); } @Test public void testRedactImage() throws Exception { - RedactImageFile.redactImageFile(PROJECT_ID, INPUT_FILE, OUTPUT_FILE); + RedactImageFile.redactImageFile(PROJECT_ID, SIMPLE_INPUT_FILE, SIMPLE_OUTPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Redacted image written")); + } + + @Test + public void testRedactImageAllInfoTypes() throws Exception { + RedactImageFileAllInfoTypes.redactImageFileAllInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, + DOCUMENT_OUTPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Redacted image written")); + } + + @Test + public void testRedactImageListedInfoTypes() throws Exception { + RedactImageFileListedInfoTypes.redactImageFileListedInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, + DOCUMENT_OUTPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Redacted image written")); + } + + @Test + public void testRedactImageColoredInfoTypes() throws Exception { + RedactImageFileColoredInfoTypes.redactImageFileColoredInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, + DOCUMENT_OUTPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Redacted image written")); + } + + @Test + public void testRedactImageAllText() throws Exception { + RedactImageFileAllText.redactImageFileAllText(PROJECT_ID, DOCUMENT_INPUT_FILE, + DOCUMENT_OUTPUT_FILE); String output = bout.toString(); assertThat(output, containsString("Redacted image written")); diff --git a/dlp/snippets/snippets/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/snippets/src/test/resources/sensitive-data-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6e2d84546e4c623df6dbc5c9cb45813e468ecf82 GIT binary patch literal 78548 zcmeFa2V7Li(l>mDAt)kR1QZEF&IrPg5ff1) z2ML0bGfGY~^PT~9_inhm``o?ncklN;$KRPb^y%*Es;=(o`d4*}{eb-h98;82kOLqP z0JsAF1F)ZgtFkw3tpGq-8Q=r};1B@0XA9tiPhb{+7Q6ufii7}A@Ed|lL*jjZOHhr3 zet(9};4)$t0TDGDXLn~e8|NF$g6H@EkxL57__*4@YybJo{^PM8hR^{7@Em_O;PB&x ztxNvcmjL-8=nO$M6mlBCBZolAA=tM76G)Q)vVZLt13w^mP<#SHqCF!@%I@ zvGIw?sp*;7xvwj$YwH`ETiZK0zCd{%umye|aP|wn$U(mF@bRJeL^!@6cwRWh$?*wJ z@e>}GRwugda^kc=;30}jktxNm4zmbqe4#XR?Ib?QD)jlxR~&2moc%e*g8oOG{b1}T zzJ>r9fPVktqo?P)%*V%f+2}HO8MzzbF85IP{VVj_mA!wx#a+W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&_fp^G}WcZ>|6Ter5kX F_HW4}ge(96 literal 0 HcmV?d00001 From 02824076747cd6637ce5c6e424fc272f95eef28c Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Fri, 5 Jun 2020 18:44:11 -0700 Subject: [PATCH 076/406] samples: Fix pubsub handling for DLP samples and tests (#3076) Fixes internal bug b/158322296 1. Update DLP java tests to use unique topic/subscription for each test. This should help avoid flakes caused by concurrent test runs competing for resources. The PUBSUB_ env vars are still required, but used as a prefix instead of as a shared single topic/sub. 2. Properly close the subscription in each sample before returning. This avoids a race condition with topic/subscription cleanup, in addition to being good hygiene. - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../dlp/snippets/InspectBigQueryTable.java | 3 + .../dlp/snippets/InspectDatastoreEntity.java | 3 + .../java/dlp/snippets/InspectGcsFile.java | 3 + .../snippets/InspectStringOmitOverlap.java | 4 +- .../snippets/InspectStringWithoutOverlap.java | 4 +- .../RiskAnalysisCategoricalStats.java | 3 + .../dlp/snippets/RiskAnalysisKAnonymity.java | 3 + .../java/dlp/snippets/RiskAnalysisKMap.java | 3 + .../dlp/snippets/RiskAnalysisLDiversity.java | 3 + .../snippets/RiskAnalysisNumericalStats.java | 3 + .../test/java/dlp/snippets/InspectTests.java | 73 ++++++++++++++++--- .../java/dlp/snippets/RiskAnalysisTests.java | 72 +++++++++++++++--- 12 files changed, 150 insertions(+), 27 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index fb00640d697..d198080497b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -140,6 +140,9 @@ public static void inspectBigQueryTable( } catch (TimeoutException e) { System.out.println("Job was not completed after 15 minutes."); return; + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Get the latest state of the job from the service diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index 2618c98a857..33a865b9070 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -141,6 +141,9 @@ public static void insepctDatastoreEntity( } catch (TimeoutException e) { System.out.println("Job was not completed after 15 minutes."); return; + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Get the latest state of the job from the service diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 3411381510a..3f0d95f23a8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -127,6 +127,9 @@ public static void inspectGcsFile( } catch (TimeoutException e) { System.out.println("Job was not completed after 15 minutes."); return; + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Get the latest state of the job from the service diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java index 8361eb9fbde..e09b4083779 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java @@ -16,7 +16,7 @@ package dlp.snippets; -// [START dlp_inspect_string_with_exclusion_dict] +// [START dlp_inspect_string_omit_overlap] import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; @@ -114,4 +114,4 @@ public static void inspectStringOmitOverlap(String projectId, String textToInspe } } } -// [END dlp_inspect_string_with_exclusion_dict] +// [END dlp_inspect_string_omit_overlap] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java index 170e54e859d..7cba917a383 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java @@ -16,7 +16,7 @@ package dlp.snippets; -// [START dlp_inspect_string_with_exclusion_dict] +// [START dlp_inspect_string_without_overlap] import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.privacy.dlp.v2.ByteContentItem; @@ -123,4 +123,4 @@ public static void inspectStringWithoutOverlap(String projectId, String textToIn } } } -// [END dlp_inspect_string_with_exclusion_dict] +// [END dlp_inspect_string_without_overlap] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index af2a714e484..492e295ca9c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -127,6 +127,9 @@ public static void categoricalStatsAnalysis( Thread.sleep(500); // Wait for the job to become available } catch (TimeoutException e) { System.out.println("Unable to verify job completion."); + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Build a request to get the completed job diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index 3ec81caaaed..634e2961534 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -135,6 +135,9 @@ public static void calculateKAnonymity( Thread.sleep(500); // Wait for the job to become available } catch (TimeoutException e) { System.out.println("Unable to verify job completion."); + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Build a request to get the completed job diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index b83f8e460aa..d453f30f8a5 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -159,6 +159,9 @@ public static void calculateKMap( Thread.sleep(500); // Wait for the job to become available } catch (TimeoutException e) { System.out.println("Unable to verify job completion."); + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Build a request to get the completed job diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 2de783c1680..bd8fa1af2ef 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -143,6 +143,9 @@ public static void calculateLDiversity( Thread.sleep(500); // Wait for the job to become available } catch (TimeoutException e) { System.out.println("Unable to verify job completion."); + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Build a request to get the completed job diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index b0c4196e49a..3cb1792e543 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -127,6 +127,9 @@ public static void numericalStatsAnalysis( Thread.sleep(500); // Wait for the job to become available } catch (TimeoutException e) { System.out.println("Unable to verify job completion."); + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); } // Build a request to get the completed job diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 358a44775ac..6e340cd1429 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -21,11 +21,19 @@ import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertNotNull; +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PushConfig; +import com.google.pubsub.v1.TopicName; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.Arrays; +import java.util.UUID; import org.junit.After; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -42,7 +50,16 @@ public class InspectTests { // TODO: Update as ENV_VARs private static final String datastoreNamespace = ""; private static final String datastoreKind = "dlp"; + private ByteArrayOutputStream bout; + private UUID testRunUuid = UUID.randomUUID(); + private TopicName topicName = TopicName.of( + PROJECT_ID, + String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); + private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( + PROJECT_ID, + String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); + private PrintStream originalOut = System.out; private static void requireEnvVar(String varName) { assertNotNull( @@ -50,8 +67,8 @@ private static void requireEnvVar(String varName) { System.getenv(varName)); } - @Before - public void checkRequirements() { + @BeforeClass + public static void checkRequirements() { requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("GOOGLE_CLOUD_PROJECT"); requireEnvVar("GCS_PATH"); @@ -62,15 +79,47 @@ public void checkRequirements() { } @Before - public void captureOut() { + public void setUp() throws Exception { + // Create a new topic + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + topicAdminClient.createTopic(topicName); + } + + // Create a new subscription + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + subscriptionAdminClient + .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); + } + + // Capture stdout bout = new ByteArrayOutputStream(); System.setOut(new PrintStream(bout)); } + @After - public void releaseOut() { - System.setOut(null); + public void tearDown() throws Exception { + // Restore stdout + System.setOut(originalOut); bout.reset(); + + // Delete the test topic + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + topicAdminClient.deleteTopic(topicName); + } catch (ApiException e) { + System.err.println(String.format("Error deleting topic %s: %s", + topicName.getTopic(), e)); + // Keep trying to clean up + } + + // Delete the test subscription + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + subscriptionAdminClient.deleteSubscription(subscriptionName); + } catch (ApiException e) { + System.err.println(String.format("Error deleting subscription %s: %s", + subscriptionName.getSubscription(), e)); + // Keep trying to clean up + } } @Test @@ -183,7 +232,9 @@ public void testInspectImageFile() throws Exception { @Test public void testInspectGcsFile() throws Exception { - InspectGcsFile.inspectGcsFile(PROJECT_ID, GCS_PATH, TOPIC_ID, SUBSCRIPTION_ID); + InspectGcsFile + .inspectGcsFile(PROJECT_ID, GCS_PATH, topicName.getTopic(), + subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output, containsString("Job status: DONE")); @@ -191,9 +242,9 @@ public void testInspectGcsFile() throws Exception { @Test public void testInspectDatastoreEntity() throws Exception { - - InspectDatastoreEntity.insepctDatastoreEntity( - PROJECT_ID, datastoreNamespace, datastoreKind, TOPIC_ID, SUBSCRIPTION_ID); + InspectDatastoreEntity + .insepctDatastoreEntity(PROJECT_ID, datastoreNamespace, datastoreKind, topicName.getTopic(), + subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output, containsString("Job status: DONE")); @@ -201,9 +252,9 @@ public void testInspectDatastoreEntity() throws Exception { @Test public void testInspectBigQueryTable() throws Exception { - InspectBigQueryTable - .inspectBigQueryTable(PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + .inspectBigQueryTable(PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), + subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output, containsString("Job status: DONE")); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index d1ca2a848e8..e03002c494c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -21,8 +21,15 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.pubsub.v1.SubscriptionAdminClient; +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PushConfig; +import com.google.pubsub.v1.TopicName; import java.io.ByteArrayOutputStream; import java.io.PrintStream; +import java.util.UUID; import java.util.regex.Pattern; import org.junit.After; import org.junit.Before; @@ -39,7 +46,16 @@ public class RiskAnalysisTests { private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); + private ByteArrayOutputStream bout; + private UUID testRunUuid = UUID.randomUUID(); + private TopicName topicName = TopicName.of( + PROJECT_ID, + String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); + private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( + PROJECT_ID, + String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); + private PrintStream originalOut = System.out; private static void requireEnvVar(String varName) { assertNotNull( @@ -58,15 +74,52 @@ public static void checkRequirements() { } @Before - public void setUp() { + public void setUp() throws Exception { + // Create a new topic + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + topicAdminClient.createTopic(topicName); + } + // Create a new subscription + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + subscriptionAdminClient + .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); + } + + // Capture stdout bout = new ByteArrayOutputStream(); System.setOut(new PrintStream(bout)); } + + @After + public void tearDown() throws Exception { + // Restore stdout + System.setOut(originalOut); + bout.reset(); + + // Delete the test topic + try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { + topicAdminClient.deleteTopic(topicName); + } catch (ApiException e) { + System.err.println(String.format("Error deleting topic %s: %s", + topicName.getTopic(), e)); + // Keep trying to clean up + } + + // Delete the test subscription + try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { + subscriptionAdminClient.deleteSubscription(subscriptionName); + } catch (ApiException e) { + System.err.println(String.format("Error deleting subscription %s: %s", + subscriptionName.getSubscription(), e)); + // Keep trying to clean up + } + } + @Test public void testNumericalStats() throws Exception { RiskAnalysisNumericalStats.numericalStatsAnalysis( - PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output, containsString("Value at ")); } @@ -74,7 +127,7 @@ public void testNumericalStats() throws Exception { @Test public void testCategoricalStats() throws Exception { RiskAnalysisCategoricalStats.categoricalStatsAnalysis( - PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); @@ -85,7 +138,7 @@ public void testCategoricalStats() throws Exception { @Test public void testKAnonymity() throws Exception { RiskAnalysisKAnonymity.calculateKAnonymity( - PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertTrue(Pattern.compile("Bucket size range: \\[\\d, \\d\\]").matcher(output).find()); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); @@ -95,7 +148,7 @@ public void testKAnonymity() throws Exception { @Test public void testLDiversity() throws Exception { RiskAnalysisLDiversity.calculateLDiversity( - PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertTrue(output.contains("Quasi-ID values: integer_value: 19")); assertTrue(output.contains("Class size: 1")); @@ -104,7 +157,8 @@ public void testLDiversity() throws Exception { @Test public void testKMap() throws Exception { - RiskAnalysisKMap.calculateKMap(PROJECT_ID, DATASET_ID, TABLE_ID, TOPIC_ID, SUBSCRIPTION_ID); + RiskAnalysisKMap.calculateKMap( + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); @@ -112,10 +166,4 @@ public void testKMap() throws Exception { assertTrue(Pattern.compile("Size: \\d").matcher(output).find()); assertTrue(Pattern.compile("Values: \\{\\d{2}, \"Female\"\\}").matcher(output).find()); } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } } From 8511cfa5506c6ec50454629e494d682fe780149b Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Mon, 8 Jun 2020 09:28:05 -0700 Subject: [PATCH 077/406] samples: Inspect custom hotword b 156971569 (#3080) Fixes internal bug b/156971569 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../snippets/InspectStringCustomHotword.java | 112 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 18 +++ 2 files changed, 130 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java new file mode 100644 index 00000000000..3f0b31daa1d --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java @@ -0,0 +1,112 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_custom_hotword] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.LocationName; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class InspectStringCustomHotword { + + public static void inspectStringCustomHotword() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "patient name: John Doe"; + String customHotword = "patient"; + inspectStringCustomHotword(projectId, textToInspect, customHotword); + } + + // Inspects the provided text. + public static void inspectStringCustomHotword(String projectId, String textToInspect, + String customHotword) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Increase likelihood of matches that have customHotword nearby + HotwordRule hotwordRule = HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder() + .setPattern(customHotword)) + .setProximity(Proximity.newBuilder() + .setWindowBefore(50)) + .setLikelihoodAdjustment(LikelihoodAdjustment.newBuilder() + .setFixedLikelihood(Likelihood.VERY_LIKELY)) + .build(); + + // Construct a ruleset that applies the hotword rule to the PERSON_NAME infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME").build()) + .addRules(InspectionRule.newBuilder().setHotwordRule(hotwordRule)) + .build(); + + // Construct the configuration for the Inspect request. + InspectConfig config = + InspectConfig.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME").build()) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .setMinLikelihood(Likelihood.VERY_LIKELY) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_string_custom_hotword] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 6e340cd1429..7545c0216a0 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -213,6 +213,24 @@ public void testInspectStringWithoutOverlap() throws Exception { assertThat(output, not(containsString("example.org"))); } + @Test + public void testInspectStringCustomHotword() throws Exception { + InspectStringCustomHotword.inspectStringCustomHotword(PROJECT_ID, + "patient name: John Doe", "patient"); + + String output = bout.toString(); + assertThat(output, containsString("John Doe")); + } + + @Test + public void testInspectStringCustomHotwordNegativeExample() throws Exception { + InspectStringCustomHotword.inspectStringCustomHotword(PROJECT_ID, + "name: John Doe", "patient"); + + String output = bout.toString(); + assertThat(output, not(containsString("John Doe"))); + } + @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From f87fb351f9997fd490681a3bb31ebeae70244543 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Mon, 8 Jun 2020 14:02:21 -0700 Subject: [PATCH 078/406] samples: Add Java code sample for table inspection (#3062) To be linked from https://cloud.google.com/dlp/docs/inspecting-structured-text --- .../main/java/dlp/snippets/InspectTable.java | 100 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 19 ++++ 2 files changed, 119 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java new file mode 100644 index 00000000000..bf7347da330 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_table] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class InspectTable { + + public static void inspectTable() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToInspect = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("name").build()) + .addHeaders(FieldId.newBuilder().setName("phone").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("John Doe").build()) + .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) + .build(); + + inspectTable(projectId, tableToInspect); + } + + // Inspects the provided text. + public static void inspectTable(String projectId, Table tableToInspect) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the table to be inspected. + ContentItem item = ContentItem.newBuilder().setTable(tableToInspect).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("PHONE_NUMBER").build(); + + // Construct the configuration for the Inspect request. + InspectConfig config = + InspectConfig.newBuilder() + .addInfoTypes(infoType) + .setIncludeQuote(true) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_inspect_table] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 7545c0216a0..acbdf0cad51 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -24,6 +24,10 @@ import com.google.api.gax.rpc.ApiException; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.TopicName; @@ -212,6 +216,21 @@ public void testInspectStringWithoutOverlap() throws Exception { assertThat(output, containsString("example.com")); assertThat(output, not(containsString("example.org"))); } + + @Test + public void testInspectTable() { + Table tableToInspect = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("name").build()) + .addHeaders(FieldId.newBuilder().setName("phone").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("John Doe").build()) + .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) + .build(); + InspectTable.inspectTable(PROJECT_ID, tableToInspect); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + } @Test public void testInspectStringCustomHotword() throws Exception { From f20988cb5a4642e2bd29660b7eceaad9a29a812b Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Mon, 8 Jun 2020 17:46:36 -0700 Subject: [PATCH 079/406] samples: Add Java code samples for image inspection (#3088) To be linked from https://cloud.google.com/dlp/docs/inspecting-images --- .../InspectImageFileAllInfoTypes.java | 74 +++++++++++++++ .../InspectImageFileListedInfoTypes.java | 90 +++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 22 +++++ 3 files changed, 186 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java new file mode 100644 index 00000000000..1cb5aac931f --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_image_all_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.IOException; + +class InspectImageFileAllInfoTypes { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/sensitive-data-image.jpeg"; + inspectImageFileAllInfoTypes(projectId, inputPath); + } + + static void inspectImageFileAllInfoTypes(String projectId, String inputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be inspected. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Construct the Inspect request to be sent by the client. + // Do not specify the type of info to inspect. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(ContentItem.newBuilder().setByteItem(byteItem).build()) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results. + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_image_all_infotypes] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java new file mode 100644 index 00000000000..bfc6db7dc66 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_image_listed_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.protobuf.ByteString; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +class InspectImageFileListedInfoTypes { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "my-project-id"; + String inputPath = "src/test/resources/sensitive-data-image.jpeg"; + inspectImageFileListedInfoTypes(projectId, inputPath); + } + + static void inspectImageFileListedInfoTypes(String projectId, String inputPath) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be inspected. + ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath)); + ByteContentItem byteItem = + ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build(); + + // Specify the type of info the inspection will look for. + List infoTypes = new ArrayList<>(); + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + for (String typeName : + new String[] {"US_SOCIAL_SECURITY_NUMBER", "EMAIL_ADDRESS", "PHONE_NUMBER"}) { + infoTypes.add(InfoType.newBuilder().setName(typeName).build()); + } + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(ContentItem.newBuilder().setByteItem(byteItem).build()) + .setInspectConfig(inspectConfig) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results. + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_image_listed_infotypes] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index acbdf0cad51..8e05b5b46bc 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -54,6 +54,7 @@ public class InspectTests { // TODO: Update as ENV_VARs private static final String datastoreNamespace = ""; private static final String datastoreKind = "dlp"; + private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; private ByteArrayOutputStream bout; private UUID testRunUuid = UUID.randomUUID(); @@ -267,6 +268,27 @@ public void testInspectImageFile() throws Exception { assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } + @Test + public void testRedactImageAllInfoTypes() throws Exception { + InspectImageFileAllInfoTypes.inspectImageFileAllInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, containsString("Info type: DATE")); + } + + @Test + public void testRedactImageListedInfoTypes() throws Exception { + InspectImageFileListedInfoTypes.inspectImageFileListedInfoTypes( + PROJECT_ID, DOCUMENT_INPUT_FILE); + + String output = bout.toString(); + assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output, not(containsString("Info type: DATE"))); + } + @Test public void testInspectGcsFile() throws Exception { InspectGcsFile From 8793da2572822590e3a9c60e298f832bb1ac3bf7 Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Tue, 9 Jun 2020 10:49:57 -0700 Subject: [PATCH 080/406] samples: Create Java code sample for wordList example (#3092) * Create DeIdentifyWithSimpleWordList.java * Update DeIdentificationTests.java * Update DeIdentifyWithSimpleWordList.java * Update DeIdentifyWithSimpleWordList.java * Update DeIdentifyWithSimpleWordList.java --- .../DeIdentifyWithSimpleWordList.java | 113 ++++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 9 ++ 2 files changed, 122 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java new file mode 100644 index 00000000000..9cb708bd014 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_simple_word_list] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import java.io.IOException; + +public class DeIdentifyWithSimpleWordList { + + public static void deIdentifyWithSimpleWordList() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToDeIdentify = "Patient was seen in RM-YELLOW then transferred to rm green."; + deidentifyWithSimpleWordList(projectId, textToDeIdentify); + } + + public static void deidentifyWithSimpleWordList(String projectId, String textToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + + // Specify what content you want the service to DeIdentify. + ContentItem contentItem = ContentItem.newBuilder().setValue(textToDeIdentify).build(); + + // Construct the word list to be detected + Dictionary wordList = + Dictionary.newBuilder() + .setWordList( + WordList.newBuilder() + .addWords("RM-GREEN") + .addWords("RM-YELLOW") + .addWords("RM-ORANGE") + .build()) + .build(); + + // Specify the word list custom info type the inspection will look for. + InfoType infoType = InfoType.newBuilder().setName("CUSTOM_ROOM_ID").build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder().setInfoType(infoType).setDictionary(wordList).build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addCustomInfoTypes(customInfoType).build(); + + // Define type of deidentification as replacement. + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(ReplaceWithInfoTypeConfig.getDefaultInstance()) + .build(); + + // Associate deidentification type with info type. + InfoTypeTransformation transformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + + // Construct the configuration for the Redact request and list all desired transformations. + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations( + InfoTypeTransformations.newBuilder().addTransformations(transformation)) + .build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results + System.out.println( + "Text after replace with infotype config: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_simple_word_list] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index f451ea90d8a..e8e43b2f78a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -118,4 +118,13 @@ public void testDeIdentifyWithReplacement() throws IOException { assertThat(output, containsString("Text after redaction: " + "My name is Alicia Abernathy, and my email address is [email-address].")); } + + @Test + public void testDeIdentifyWithSimpleWordList() throws IOException { + DeIdentifyWithSimpleWordList.deidentifyWithSimpleWordList( + PROJECT_ID, "Patient was seen in RM-YELLOW then transferred to rm green."); + + String output = bout.toString(); + assertThat(output, containsString("Text after replace with infotype config: ")); + } } From 4ca6e397c8e4b795386ab6c890e92d23ac9400e5 Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Tue, 9 Jun 2020 14:28:08 -0700 Subject: [PATCH 081/406] samples: Create Java code sample for custom regex (#3111) To be linked from https://cloud.google.com/dlp/docs/creating-custom-infotypes-regex#regex-example Fixes #issue It's a good idea to open an issue first for discussion. [yes] I have followed Sample Format Guide [yes] pom.xml parent set to latest shared-configuration [nothing new] Appropriate changes to README are included in PR [nothing new] API's need to be enabled to test (tell us) [nothing new] Environment Variables need to be set (ask us to set them) [yes] Tests pass (mvn -P lint clean verify) (Note- Checkstyle passing is required; Spotbugs, ErrorProne, PMD, etc. ERROR's are advisory only) [yes] Please merge this PR for me once it is approved. --- .../dlp/snippets/InspectWithCustomRegex.java | 102 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 8 ++ 2 files changed, 110 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java new file mode 100644 index 00000000000..98941bf831b --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_custom_regex] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class InspectWithCustomRegex { + + public static void inspectWithCustomRegex() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Patients MRN 444-5-22222"; + String customRegexPattern = "[1-9]{3}-[1-9]{1}-[1-9]{5}"; + inspectWithCustomRegex(projectId, textToInspect, customRegexPattern); + } + + // Inspects a BigQuery Table + public static void inspectWithCustomRegex( + String projectId, String textToInspect, String customRegexPattern) throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the regex pattern the inspection will look for. + Regex regex = Regex.newBuilder().setPattern(customRegexPattern).build(); + + // Construct the custom regex detector. + InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); + + // Construct the configuration for the Inspect request. + InspectConfig config = + InspectConfig.newBuilder() + .addCustomInfoTypes(customInfoType) + .setIncludeQuote(true) + .setMinLikelihood(Likelihood.POSSIBLE) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_custom_regex] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 8e05b5b46bc..4dbcaf86544 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -143,6 +143,14 @@ public void testInspectString() throws Exception { assertThat(output, containsString("Info type: EMAIL_ADDRESS")); } + @Test + public void testInspectWithCustomRegex() throws Exception { + InspectWithCustomRegex.inspectWithCustomRegex( + PROJECT_ID, "Patients MRN 444-5-22222", "[1-9]{3}-[1-9]{1}-[1-9]{5}"); + + String output = bout.toString(); + assertThat(output, containsString("Info type: C_MRN")); + } @Test public void testInspectStringWithExclusionDict() throws Exception { From d6849c465169fc8401d9e2aec652af30ee742d25 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Wed, 10 Jun 2020 10:48:44 -0700 Subject: [PATCH 082/406] samples: Add Java code sample for redaction (#3051) * Add Java code sample for redaction To be linked from https://cloud.google.com/dlp/docs/transformations-reference * Update DeIdentifyWithRedaction.java --- .../dlp/snippets/DeIdentifyWithRedaction.java | 92 +++++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 11 +++ 2 files changed, 103 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java new file mode 100644 index 00000000000..c7cd88f337d --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_redact] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RedactConfig; + +public class DeIdentifyWithRedaction { + + public static void deIdentifyWithRedaction() { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = + "My name is Alicia Abernathy, and my email address is aabernathy@example.com."; + deIdentifyWithRedaction(projectId, textToInspect); + } + + // Inspects the provided text. + public static void deIdentifyWithRedaction(String projectId, String textToRedact) { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be inspected. + ContentItem item = ContentItem.newBuilder() + .setValue(textToRedact).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); + InspectConfig inspectConfig = InspectConfig.newBuilder().addInfoTypes(infoType).build(); + // Define type of deidentification. + PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() + .setRedactConfig(RedactConfig.getDefaultInstance()) + .build(); + // Associate deidentification type with info type. + InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + // Construct the configuration for the Redact request and list all desired transformations. + DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() + .addTransformations(transformation)) + .build(); + + // Construct the Redact request to be sent by the client. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setDeidentifyConfig(redactConfig) + .setInspectConfig(inspectConfig) + .build(); + + // Use the client to send the API request. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Parse the response and process results + System.out.println("Text after redaction: " + response.getItem().getValue()); + } catch (Exception e) { + System.out.println("Error during inspectString: \n" + e.toString()); + } + } +} +// [END dlp_deidentify_redact] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index e8e43b2f78a..91d29f4a17e 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -108,6 +108,17 @@ public void testDeIdentifyWithDateShift() throws IOException { Files.delete(outputFile); } + @Test + public void testDeIdentifyWithRedaction() throws IOException { + DeIdentifyWithRedaction.deIdentifyWithRedaction( + PROJECT_ID, + "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); + + String output = bout.toString(); + assertThat(output, containsString("Text after redaction: " + + "My name is Alicia Abernathy, and my email address is .")); + } + @Test public void testDeIdentifyWithReplacement() throws IOException { DeIdentifyWithReplacement.deIdentifyWithReplacement( From 6dc7a8b969ef50dbfb6dbf607590b1c7deba3d3a Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Wed, 10 Jun 2020 12:12:56 -0700 Subject: [PATCH 083/406] samples: Create Java code sample for multiple rules (#3112) * Create Java code sample for multiple rules * add more tests * fix formatting * More formatting fix * one more format fix --- .../snippets/InspectStringMultipleRules.java | 134 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 36 +++++ 2 files changed, 170 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java new file mode 100644 index 00000000000..9b6959b20c3 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java @@ -0,0 +1,134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_string_multiple_rules] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.ExclusionRule; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.MatchingType; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class InspectStringMultipleRules { + + public static void inspectStringMultipleRules() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "patient: Jane Doe"; + inspectStringMultipleRules(projectId, textToInspect); + } + + // Inspects the provided text, avoiding matches specified in the exclusion list. + public static void inspectStringMultipleRules(String projectId, String textToInspect) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Construct hotword rules + HotwordRule patientRule = HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern("patient")) + .setProximity(Proximity.newBuilder().setWindowBefore(10)) + .setLikelihoodAdjustment( + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.VERY_LIKELY)) + .build(); + + HotwordRule doctorRule = HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern("doctor")) + .setProximity(Proximity.newBuilder().setWindowBefore(10)) + .setLikelihoodAdjustment( + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.UNLIKELY)) + .build(); + + // Construct exclusion rules + ExclusionRule quasimodoRule = ExclusionRule.newBuilder() + .setDictionary( + Dictionary.newBuilder().setWordList(WordList.newBuilder().addWords("Quasimodo"))) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); + + ExclusionRule redactedRule = ExclusionRule.newBuilder() + .setRegex(Regex.newBuilder().setPattern("REDACTED")) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); + + // Construct a ruleset that applies the rules to the PERSON_NAME infotype. + InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setHotwordRule(patientRule)) + .addRules(InspectionRule.newBuilder().setHotwordRule(doctorRule)) + .addRules(InspectionRule.newBuilder().setExclusionRule(quasimodoRule)) + .addRules(InspectionRule.newBuilder().setExclusionRule(redactedRule)) + .build(); + + // Construct the configuration for the Inspect request, including the ruleset. + InspectConfig config = + InspectConfig.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .setIncludeQuote(true) + .addRuleSet(ruleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_string_multiple_rules] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 4dbcaf86544..ebe7c5e56fa 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -259,6 +259,42 @@ public void testInspectStringCustomHotwordNegativeExample() throws Exception { assertThat(output, not(containsString("John Doe"))); } + @Test + public void testInspectStringMultipleRulesPatientRule() throws Exception { + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, + "patient: Jane Doe"); + + String output = bout.toString(); + assertThat(output, containsString("VERY_LIKELY")); + } + + @Test + public void testInspectStringMultipleRulesDoctorRule() throws Exception { + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, + "doctor: Jane Doe"); + + String output = bout.toString(); + assertThat(output, containsString("Findings: 0")); + } + + @Test + public void testInspectStringMultipleRulesQuasimodoRule() throws Exception { + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, + "patient: Quasimodo"); + + String output = bout.toString(); + assertThat(output, containsString("Findings: 0")); + } + + @Test + public void testInspectStringMultipleRulesRedactedRule() throws Exception { + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, + "name of patient: REDACTED"); + + String output = bout.toString(); + assertThat(output, containsString("Findings: 0")); + } + @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); From da2661a7c9f75b41465efa425d24b5d11e7e502f Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Wed, 10 Jun 2020 13:08:08 -0700 Subject: [PATCH 084/406] samples: Create Java code sample for wordList example - Exception list (#3120) To be linked from https://cloud.google.com/dlp/docs/creating-custom-infotypes-dictionary#exception_list Fixes #issue It's a good idea to open an issue first for discussion. [yes] I have followed Sample Format Guide [yes] pom.xml parent set to latest shared-configuration [nothing new] Appropriate changes to README are included in PR [nothing new] API's need to be enabled to test (tell us) [nothing new] Environment Variables need to be set (ask us to set them) [yes] Tests pass (mvn -P lint clean verify) (Note- Checkstyle passing is required; Spotbugs, ErrorProne, PMD, etc. ERROR's are advisory only) [yes] Please merge this PR for me once it is approved. --- .../snippets/DeIdentifyWithExceptionList.java | 118 ++++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 9 ++ 2 files changed, 127 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java new file mode 100644 index 00000000000..5aab72d1f7e --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_exception_list] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary; +import com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import java.io.IOException; + +public class DeIdentifyWithExceptionList { + + public static void deIdentifyWithExceptionList() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToDeIdentify = "jack@example.org accessed customer record of user5@example.com"; + deIdentifyWithExceptionList(projectId, textToDeIdentify); + } + + public static void deIdentifyWithExceptionList(String projectId, String textToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + + // Specify what content you want the service to DeIdentify. + ContentItem contentItem = ContentItem.newBuilder().setValue(textToDeIdentify).build(); + + // Construct the custom word list to be detected. + Dictionary wordList = + Dictionary.newBuilder() + .setWordList( + WordList.newBuilder() + .addWords("jack@example.org") + .addWords("jill@example.org") + .build()) + .build(); + + // Construct the custom dictionary detector associated with the word list. + InfoType developerEmail = InfoType.newBuilder().setName("DEVELOPER_EMAIL").build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder().setInfoType(developerEmail).setDictionary(wordList).build(); + + // Specify the word list custom info type and build-in info type the inspection will look for. + InfoType emailAddress = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addInfoTypes(emailAddress) + .addCustomInfoTypes(customInfoType) + .build(); + + // Define type of deidentification as replacement. + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(ReplaceWithInfoTypeConfig.getDefaultInstance()) + .build(); + + // Associate de-identification type with info type. + InfoTypeTransformation transformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(emailAddress) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + + // Construct the configuration for the de-id request and list all desired transformations. + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations( + InfoTypeTransformations.newBuilder().addTransformations(transformation)) + .build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of(projectId).toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results + System.out.println( + "Text after replace with infotype config: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_exception_list] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index 91d29f4a17e..b9f316c1f20 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -138,4 +138,13 @@ public void testDeIdentifyWithSimpleWordList() throws IOException { String output = bout.toString(); assertThat(output, containsString("Text after replace with infotype config: ")); } + + @Test + public void testDeIdentifyWithExceptionList() throws IOException { + DeIdentifyWithExceptionList.deIdentifyWithExceptionList( + PROJECT_ID, "jack@example.org accessed customer record of user5@example.com"); + + String output = bout.toString(); + assertThat(output, containsString("Text after replace with infotype config: ")); + } } From 3c9ffd6062278c5d2c9dd63fa9d0d346e3c75a48 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Wed, 10 Jun 2020 16:08:09 -0700 Subject: [PATCH 085/406] samples: Formatting consistency pass for DLP Inspect* samples (#3132) Fix some minor formatting inconsistencies across my last several commits and other samples in the same group. - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing New**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing New**) - [X] Tests pass (`mvn -P lint clean verify`) * (Note- `Checkstyle` passing is required; `Spotbugs`, `ErrorProne`, `PMD`, etc. `ERROR`'s are advisory only) - [X] Please **merge** this PR for me once it is approved. --- .../dlp/snippets/InspectBigQueryTable.java | 7 ++- .../dlp/snippets/InspectDatastoreEntity.java | 5 +- .../java/dlp/snippets/InspectGcsFile.java | 5 +- .../java/dlp/snippets/InspectImageFile.java | 7 ++- .../InspectImageFileListedInfoTypes.java | 2 + .../main/java/dlp/snippets/InspectString.java | 5 +- ...InspectStringCustomExcludingSubstring.java | 27 ++++---- .../snippets/InspectStringCustomHotword.java | 24 ++++---- .../InspectStringCustomOmitOverlap.java | 31 +++++----- .../snippets/InspectStringMultipleRules.java | 61 ++++++++++--------- .../snippets/InspectStringOmitOverlap.java | 19 +++--- .../InspectStringWithExclusionDict.java | 20 +++--- ...spectStringWithExclusionDictSubstring.java | 20 +++--- .../InspectStringWithExclusionRegex.java | 18 +++--- .../snippets/InspectStringWithoutOverlap.java | 28 +++++---- .../java/dlp/snippets/InspectTextFile.java | 7 ++- .../dlp/snippets/InspectWithCustomRegex.java | 5 +- 17 files changed, 167 insertions(+), 124 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index d198080497b..537df75044c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -94,7 +94,10 @@ public static void inspectBigQueryTable( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); @@ -159,7 +162,7 @@ public static void inspectBigQueryTable( } } } - + // handleMessage injects the job and settableFuture into the message reciever interface private static void handleMessage( DlpJob job, diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index 33a865b9070..588e9f837bb 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -95,7 +95,10 @@ public static void insepctDatastoreEntity( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 3f0d95f23a8..441791c8535 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -81,7 +81,10 @@ public static void inspectGcsFile( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 064a1e07aeb..26449c13ba4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -58,13 +58,16 @@ public static void inspectImageFile(String projectId, String filePath) throws IO // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java index bfc6db7dc66..86e73022a45 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java @@ -61,6 +61,8 @@ static void inspectImageFileListedInfoTypes(String projectId, String inputPath) new String[] {"US_SOCIAL_SECURITY_NUMBER", "EMAIL_ADDRESS", "PHONE_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } + + // Construct the configuration for the Inspect request. InspectConfig inspectConfig = InspectConfig.newBuilder() .addAllInfoTypes(infoTypes) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index d9d39165236..9b32a16a40a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -65,7 +65,10 @@ public static void inspectString(String projectId, String textToInspect) throws // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java index 484b3238ffb..9d1c0cb41ed 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java @@ -70,22 +70,25 @@ public static void inspectStringCustomExcludingSubstring(String projectId, Strin // Specify the type of info the inspection will look for. InfoType infoType = InfoType.newBuilder().setName("CUSTOM_NAME_DETECTOR").build(); - CustomInfoType customInfoType = CustomInfoType.newBuilder() - .setInfoType(infoType).setRegex( - Regex.newBuilder().setPattern(customDetectorPattern)).build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(infoType).setRegex(Regex.newBuilder().setPattern(customDetectorPattern)) + .build(); // Exclude partial matches from the specified excludedSubstringList. - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) - .build(); + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(infoType) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(infoType) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java index 3f0b31daa1d..831ed379d63 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java @@ -64,20 +64,20 @@ public static void inspectStringCustomHotword(String projectId, String textToIns ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Increase likelihood of matches that have customHotword nearby - HotwordRule hotwordRule = HotwordRule.newBuilder() - .setHotwordRegex(Regex.newBuilder() - .setPattern(customHotword)) - .setProximity(Proximity.newBuilder() - .setWindowBefore(50)) - .setLikelihoodAdjustment(LikelihoodAdjustment.newBuilder() - .setFixedLikelihood(Likelihood.VERY_LIKELY)) - .build(); + HotwordRule hotwordRule = + HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern(customHotword)) + .setProximity(Proximity.newBuilder().setWindowBefore(50)) + .setLikelihoodAdjustment( + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.VERY_LIKELY)) + .build(); // Construct a ruleset that applies the hotword rule to the PERSON_NAME infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME").build()) - .addRules(InspectionRule.newBuilder().setHotwordRule(hotwordRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME").build()) + .addRules(InspectionRule.newBuilder().setHotwordRule(hotwordRule)) + .build(); // Construct the configuration for the Inspect request. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java index ee5abb7811e..add7f2a3cb6 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java @@ -64,24 +64,27 @@ public static void inspectStringCustomOmitOverlap(String projectId, String textT ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Construct the custom infotype. - CustomInfoType customInfoType = CustomInfoType.newBuilder() - .setInfoType(InfoType.newBuilder().setName("VIP_DETECTOR")) - .setRegex(Regex.newBuilder().setPattern("Larry Page|Sergey Brin")) - .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) - .build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(InfoType.newBuilder().setName("VIP_DETECTOR")) + .setRegex(Regex.newBuilder().setPattern("Larry Page|Sergey Brin")) + .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) + .build(); // Exclude matches that also match the custom infotype. - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setExcludeInfoTypes( - ExcludeInfoTypes.newBuilder().addInfoTypes(customInfoType.getInfoType())) - .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) - .build(); + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder().addInfoTypes(customInfoType.getInfoType())) + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .build(); // Construct a ruleset that applies the exclusion rule to the PERSON_NAME infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java index 9b6959b20c3..2de29404ad6 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java @@ -67,40 +67,45 @@ public static void inspectStringMultipleRules(String projectId, String textToIns ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); // Construct hotword rules - HotwordRule patientRule = HotwordRule.newBuilder() - .setHotwordRegex(Regex.newBuilder().setPattern("patient")) - .setProximity(Proximity.newBuilder().setWindowBefore(10)) - .setLikelihoodAdjustment( - LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.VERY_LIKELY)) - .build(); + HotwordRule patientRule = + HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern("patient")) + .setProximity(Proximity.newBuilder().setWindowBefore(10)) + .setLikelihoodAdjustment( + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.VERY_LIKELY)) + .build(); - HotwordRule doctorRule = HotwordRule.newBuilder() - .setHotwordRegex(Regex.newBuilder().setPattern("doctor")) - .setProximity(Proximity.newBuilder().setWindowBefore(10)) - .setLikelihoodAdjustment( - LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.UNLIKELY)) - .build(); + HotwordRule doctorRule = + HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern("doctor")) + .setProximity(Proximity.newBuilder().setWindowBefore(10)) + .setLikelihoodAdjustment( + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.UNLIKELY)) + .build(); // Construct exclusion rules - ExclusionRule quasimodoRule = ExclusionRule.newBuilder() - .setDictionary( - Dictionary.newBuilder().setWordList(WordList.newBuilder().addWords("Quasimodo"))) - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .build(); + ExclusionRule quasimodoRule = + ExclusionRule.newBuilder() + .setDictionary( + Dictionary.newBuilder().setWordList(WordList.newBuilder().addWords("Quasimodo"))) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); - ExclusionRule redactedRule = ExclusionRule.newBuilder() - .setRegex(Regex.newBuilder().setPattern("REDACTED")) - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .build(); + ExclusionRule redactedRule = + ExclusionRule.newBuilder() + .setRegex(Regex.newBuilder().setPattern("REDACTED")) + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); // Construct a ruleset that applies the rules to the PERSON_NAME infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) - .addRules(InspectionRule.newBuilder().setHotwordRule(patientRule)) - .addRules(InspectionRule.newBuilder().setHotwordRule(doctorRule)) - .addRules(InspectionRule.newBuilder().setExclusionRule(quasimodoRule)) - .addRules(InspectionRule.newBuilder().setExclusionRule(redactedRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setHotwordRule(patientRule)) + .addRules(InspectionRule.newBuilder().setHotwordRule(doctorRule)) + .addRules(InspectionRule.newBuilder().setExclusionRule(quasimodoRule)) + .addRules(InspectionRule.newBuilder().setExclusionRule(redactedRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java index e09b4083779..858b228ab25 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java @@ -70,20 +70,21 @@ public static void inspectStringOmitOverlap(String projectId, String textToInspe } // Exclude EMAIL_ADDRESS matches - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setExcludeInfoTypes( - ExcludeInfoTypes.newBuilder() + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setExcludeInfoTypes(ExcludeInfoTypes.newBuilder() .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .build(); + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); // Construct a ruleset that applies the exclusion rule to the PERSON_NAME infotype. // If a PERSON_NAME match overlaps with an EMAIL_ADDRESS match, the PERSON_NAME match will // be excluded. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("PERSON_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java index aa61d8b7249..270c040c0a3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -73,17 +73,19 @@ public static void inspectStringWithExclusionDict(String projectId, String textT } // Exclude matches from the specified excludedMatchList. - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedMatchList))) - .build(); + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedMatchList))) + .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java index 6ce64bee5e3..59da8e2a6ac 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java @@ -74,17 +74,19 @@ public static void inspectStringWithExclusionDictSubstring(String projectId, Str } // Exclude partial matches from the specified excludedSubstringList. - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) - .build(); + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .setDictionary(Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addAllInfoTypes(infoTypes) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addAllInfoTypes(infoTypes) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java index bd6c99b46e0..5bd2541b100 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java @@ -71,16 +71,18 @@ public static void inspectStringWithExclusionRegex(String projectId, String text } // Exclude matches from the specified excludedMatchList. - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) - .setRegex(Regex.newBuilder().setPattern(excludedRegex)) - .build(); + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) + .setRegex(Regex.newBuilder().setPattern(excludedRegex)) + .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java index 7cba917a383..ddb2f0b7d30 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java @@ -72,26 +72,28 @@ public static void inspectStringWithoutOverlap(String projectId, String textToIn } // Define a custom info type to exclude email addresses - CustomInfoType customInfoType = CustomInfoType.newBuilder() - .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS")) - .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) - .build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS")) + .setExclusionType(ExclusionType.EXCLUSION_TYPE_EXCLUDE) + .build(); // Exclude EMAIL_ADDRESS matches - ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setExcludeInfoTypes( - ExcludeInfoTypes.newBuilder() + ExclusionRule exclusionRule = + ExclusionRule.newBuilder() + .setExcludeInfoTypes(ExcludeInfoTypes.newBuilder() .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) - .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .build(); + .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) + .build(); // Construct a ruleset that applies the exclusion rule to the DOMAIN_NAME infotype. // If a DOMAIN_NAME match is part of an EMAIL_ADDRESS match, the DOMAIN_NAME match will // be excluded. - InspectionRuleSet ruleSet = InspectionRuleSet.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("DOMAIN_NAME")) - .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) - .build(); + InspectionRuleSet ruleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("DOMAIN_NAME")) + .addRules(InspectionRule.newBuilder().setExclusionRule(exclusionRule)) + .build(); // Construct the configuration for the Inspect request, including the ruleset. InspectConfig config = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index ea9266f183b..789bcd29905 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -58,13 +58,16 @@ public static void inspectTextFile(String projectId, String filePath) throws IOE // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); + InspectConfig.newBuilder() + .addAllInfoTypes(infoTypes) + .setIncludeQuote(true) + .build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java index 98941bf831b..5864c38acf0 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java @@ -68,7 +68,10 @@ public static void inspectWithCustomRegex( // Construct the custom regex detector. InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); CustomInfoType customInfoType = - CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); + CustomInfoType.newBuilder() + .setInfoType(infoType) + .setRegex(regex) + .build(); // Construct the configuration for the Inspect request. InspectConfig config = From 3fce9d18c54eef2a59525e412b922c504ccb3125 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Wed, 10 Jun 2020 16:43:28 -0700 Subject: [PATCH 086/406] samples: Add Java code samples for fpe (#3118) * Add Java code samples for fpe To be linked from https://cloud.google.com/dlp/docs/pseudonymization * Update DeIdentifyTableWithFpe.java * Update ReIdentifyTableWithFpe.java --- .../dlp/snippets/DeIdentifyTableWithFpe.java | 144 ++++++++++++++++++ .../dlp/snippets/DeIdentifyTextWithFpe.java | 122 +++++++++++++++ .../dlp/snippets/ReIdentifyTableWithFpe.java | 131 ++++++++++++++++ .../dlp/snippets/ReIdentifyTextWithFpe.java | 128 ++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 70 +++++++++ 5 files changed, 595 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java new file mode 100644 index 00000000000..2619f8c2555 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.util.Arrays; + +public class DeIdentifyTableWithFpe { + + public static void deIdentifyTableWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addHeaders(FieldId.newBuilder().setName("Date").build()) + .addHeaders(FieldId.newBuilder().setName("Compensation").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2015").build()) + .addValues(Value.newBuilder().setStringValue("$10").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$20").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22222").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$15").build()) + .build()) + .build(); + deIdentifyTableWithFpe(projectId, tableToDeIdentify, kmsKeyName, wrappedAesKey); + } + + public static void deIdentifyTableWithFpe( + String projectId, Table tableToDeIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how the content should be encrypted. + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + + // Specify field to be encrypted. + FieldId fieldId = FieldId.newBuilder().setName("Employee ID").build(); + + // Associate the encryption with the specified field. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addFields(fieldId) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after format-preserving encryption: " + response.getItem().getTable()); + } + } +} +// [END dlp_deidentify_table_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java new file mode 100644 index 00000000000..870120587e5 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_text_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.util.Arrays; + +public class DeIdentifyTextWithFpe { + + public static void deIdentifyTextWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToDeIdentify = "I'm Gary and my email is gary@example.com"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + deIdentifyTextWithFpe(projectId, textToDeIdentify, kmsKeyName, wrappedAesKey); + } + + public static void deIdentifyTextWithFpe( + String projectId, String textToDeIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setValue(textToDeIdentify).build(); + + // Specify the type of info you want the service to de-identify. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. + InfoType infoType = InfoType.newBuilder().setName("PHONE_NUMBER").build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addAllInfoTypes(Arrays.asList(infoType)).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it. + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how the info from the inspection should be encrypted. + InfoType surrogateInfoType = InfoType.newBuilder().setName("PHONE_TOKEN").build(); + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .setSurrogateInfoType(surrogateInfoType) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .build(); + InfoTypeTransformations transformations = + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setInfoTypeTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Text after format-preserving encryption: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_text_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java new file mode 100644 index 00000000000..598ae547423 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_reidentify_table_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class ReIdentifyTableWithFpe { + + public static void reIdentifyTableWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + Table tableToReIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addRows( + Row.newBuilder().addValues( + Value.newBuilder().setStringValue("28777").build()) + .build()) + .build(); + reIdentifyTableWithFpe(projectId, tableToReIdentify, kmsKeyName, wrappedAesKey); + } + + public static void reIdentifyTableWithFpe( + String projectId, Table tableToReIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to re-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToReIdentify).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it. + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how to un-encrypt the previously de-identified information. + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + + // Specify field to be decrypted. + FieldId fieldId = FieldId.newBuilder().setName("Employee ID").build(); + + // Associate the decryption with the specified field. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addFields(fieldId) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig reidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setReidentifyConfig(reidentifyConfig) + .build(); + + // Send the request and receive response from the service + ReidentifyContentResponse response = dlp.reidentifyContent(request); + + // Print the results + System.out.println("Table after re-identification: " + response.getItem().getValue()); + } + } +} +// [END dlp_reidentify_table_fpe] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java new file mode 100644 index 00000000000..a82885a5fd1 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java @@ -0,0 +1,128 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_reidentify_text_fpe] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.io.BaseEncoding; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CryptoKey; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; +import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class ReIdentifyTextWithFpe { + + public static void reIdentifyTextWithFpe() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToReIdentify = "My phone number is PHONE_TOKEN(10):9617256398"; + String kmsKeyName = + "projects/YOUR_PROJECT/" + + "locations/YOUR_KEYRING_REGION/" + + "keyRings/YOUR_KEYRING_NAME/" + + "cryptoKeys/YOUR_KEY_NAME"; + String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; + reIdentifyTextWithFpe(projectId, textToReIdentify, kmsKeyName, wrappedAesKey); + } + + public static void reIdentifyTextWithFpe( + String projectId, String textToReIdentify, String kmsKeyName, String wrappedAesKey) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to re-identify. + ContentItem contentItem = ContentItem.newBuilder().setValue(textToReIdentify).build(); + + // Specify the type of info the inspection will re-identify. This must use the same custom + // into type that was used as a surrogate during the initial encryption. + InfoType surrogateInfoType = InfoType.newBuilder().setName("PHONE_NUMBER").build(); + + CustomInfoType customInfoType = + CustomInfoType.newBuilder() + .setInfoType(surrogateInfoType) + .setSurrogateType(SurrogateType.getDefaultInstance()) + .build(); + InspectConfig inspectConfig = + InspectConfig.newBuilder().addCustomInfoTypes(customInfoType).build(); + + // Specify an encrypted AES-256 key and the name of the Cloud KMS key that encrypted it. + KmsWrappedCryptoKey kmsWrappedCryptoKey = + KmsWrappedCryptoKey.newBuilder() + .setWrappedKey(ByteString.copyFrom(BaseEncoding.base64().decode(wrappedAesKey))) + .setCryptoKeyName(kmsKeyName) + .build(); + CryptoKey cryptoKey = CryptoKey.newBuilder().setKmsWrapped(kmsWrappedCryptoKey).build(); + + // Specify how to un-encrypt the previously de-identified information. + CryptoReplaceFfxFpeConfig cryptoReplaceFfxFpeConfig = + CryptoReplaceFfxFpeConfig.newBuilder() + .setCryptoKey(cryptoKey) + // Set of characters in the input text. For more info, see + // https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#DeidentifyTemplate.FfxCommonNativeAlphabet + .setCommonAlphabet(FfxCommonNativeAlphabet.NUMERIC) + .setSurrogateInfoType(surrogateInfoType) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCryptoReplaceFfxFpeConfig(cryptoReplaceFfxFpeConfig) + .build(); + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addInfoTypes(surrogateInfoType) + .build(); + InfoTypeTransformations transformations = + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); + + DeidentifyConfig reidentifyConfig = + DeidentifyConfig.newBuilder().setInfoTypeTransformations(transformations).build(); + + // Combine configurations into a request for the service. + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setInspectConfig(inspectConfig) + .setReidentifyConfig(reidentifyConfig) + .build(); + + // Send the request and receive response from the service + ReidentifyContentResponse response = dlp.reidentifyContent(request); + + // Print the results + System.out.println("Text after re-identification: " + response.getItem().getValue()); + } + } +} +// [END dlp_reidentify_text_fpe] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index b9f316c1f20..e1406635286 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -20,6 +20,10 @@ import static org.hamcrest.core.StringContains.containsString; import static org.junit.Assert.assertNotNull; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -93,6 +97,72 @@ public void testReIdentifyWithFpe() throws IOException { assertThat(output, containsString("Text after re-identification:")); } + @Test + public void testDeIdentifyTextWithFpe() throws IOException { + DeIdentifyTextWithFpe.deIdentifyTextWithFpe( + PROJECT_ID, "My phone number is 4359916732", kmsKeyName, wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Text after format-preserving encryption: ")); + } + + @Test + public void testReIdentifyTextWithFpe() throws IOException { + ReIdentifyTextWithFpe.reIdentifyTextWithFpe( + PROJECT_ID, + "My phone number is PHONE_TOKEN(10):9617256398", + kmsKeyName, + wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Text after re-identification: ")); + } + + @Test + public void testDeIdentifyTableWithFpe() throws IOException { + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addHeaders(FieldId.newBuilder().setName("Date").build()) + .addHeaders(FieldId.newBuilder().setName("Compensation").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2015").build()) + .addValues(Value.newBuilder().setStringValue("$10").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$20").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22222").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$15").build()) + .build()) + .build(); + + DeIdentifyTableWithFpe.deIdentifyTableWithFpe( + PROJECT_ID, tableToDeIdentify, kmsKeyName, wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Table after format-preserving encryption:")); + } + + @Test + public void testReIdentifyTableWithFpe() throws IOException { + Table tableToReIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("28777").build()).build()) + .build(); + + ReIdentifyTableWithFpe.reIdentifyTableWithFpe( + PROJECT_ID, tableToReIdentify, kmsKeyName, wrappedKey); + + String output = bout.toString(); + assertThat(output, containsString("Table after re-identification:")); + } + @Test public void testDeIdentifyWithDateShift() throws IOException { Path inputFile = Paths.get("src/test/resources/dates.csv"); From aca13c7c8c2f980c2948ee6a391ae5d03631cae0 Mon Sep 17 00:00:00 2001 From: Chloe Liu <28527594+chloeliu123@users.noreply.github.com> Date: Thu, 11 Jun 2020 10:01:50 -0700 Subject: [PATCH 087/406] samples: Create Java code sample for custom infotype likelihood (#3145) * Create InspectWithHotwordRules.java * Update InspectTests.java --- .../dlp/snippets/InspectWithHotwordRules.java | 132 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 13 ++ 2 files changed, 145 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java new file mode 100644 index 00000000000..2eb1e002742 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java @@ -0,0 +1,132 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_hotword_rule] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.ByteContentItem.BytesType; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CustomInfoType; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; +import com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; +import com.google.privacy.dlp.v2.CustomInfoType.Regex; +import com.google.privacy.dlp.v2.Finding; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectionRule; +import com.google.privacy.dlp.v2.InspectionRuleSet; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.protobuf.ByteString; +import java.io.IOException; + +public class InspectWithHotwordRules { + + public static void inspectWithHotwordRules() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = "Patient's MRN 444-5-22222 and just a number 333-2-33333"; + String customRegexPattern = "[1-9]{3}-[1-9]{1}-[1-9]{5}"; + String hotwordRegexPattern = "(?i)(mrn|medical)(?-i)"; + inspectWithHotwordRules(projectId, textToInspect, customRegexPattern, hotwordRegexPattern); + } + + // Inspects a BigQuery Table + public static void inspectWithHotwordRules( + String projectId, String textToInspect, String customRegexPattern, String hotwordRegexPattern) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the project used for request. + ProjectName project = ProjectName.of(projectId); + + // Specify the type and content to be inspected. + ByteContentItem byteItem = + ByteContentItem.newBuilder() + .setType(BytesType.TEXT_UTF8) + .setData(ByteString.copyFromUtf8(textToInspect)) + .build(); + ContentItem item = ContentItem.newBuilder().setByteItem(byteItem).build(); + + // Specify the regex pattern the inspection will look for. + Regex regex = Regex.newBuilder().setPattern(customRegexPattern).build(); + + // Construct the custom regex detector. + InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); + CustomInfoType customInfoType = + CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); + + // Specify hotword likelihood adjustment. + LikelihoodAdjustment likelihoodAdjustment = + LikelihoodAdjustment.newBuilder().setFixedLikelihood(Likelihood.VERY_LIKELY).build(); + + // Specify a window around a finding to apply a detection rule. + Proximity proximity = Proximity.newBuilder().setWindowBefore(10).build(); + + // Construct hotword rule. + HotwordRule hotwordRule = + HotwordRule.newBuilder() + .setHotwordRegex(Regex.newBuilder().setPattern(hotwordRegexPattern).build()) + .setLikelihoodAdjustment(likelihoodAdjustment) + .setProximity(proximity) + .build(); + + // Construct rule set for the inspect config. + InspectionRuleSet inspectionRuleSet = + InspectionRuleSet.newBuilder() + .addInfoTypes(infoType) + .addRules(InspectionRule.newBuilder().setHotwordRule(hotwordRule)) + .build(); + + // Construct the configuration for the Inspect request. + InspectConfig config = + InspectConfig.newBuilder() + .addCustomInfoTypes(customInfoType) + .setIncludeQuote(true) + .setMinLikelihood(Likelihood.POSSIBLE) + .addRuleSet(inspectionRuleSet) + .build(); + + // Construct the Inspect request to be sent by the client. + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(project.toString()) + .setItem(item) + .setInspectConfig(config) + .build(); + + // Use the client to send the API request. + InspectContentResponse response = dlp.inspectContent(request); + + // Parse the response and process results + System.out.println("Findings: " + response.getResult().getFindingsCount()); + for (Finding f : response.getResult().getFindingsList()) { + System.out.println("\tQuote: " + f.getQuote()); + System.out.println("\tInfo type: " + f.getInfoType().getName()); + System.out.println("\tLikelihood: " + f.getLikelihood()); + } + } + } +} +// [END dlp_inspect_hotword_rule] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index ebe7c5e56fa..6c3d9048115 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -362,4 +362,17 @@ public void testInspectBigQueryTable() throws Exception { String output = bout.toString(); assertThat(output, containsString("Job status: DONE")); } + + @Test + public void testInspectWithHotwordRules() throws Exception { + InspectWithHotwordRules.inspectWithHotwordRules( + PROJECT_ID, + "Patient's MRN 444-5-22222 and just a number 333-2-33333", + "[1-9]{3}-[1-9]{1}-[1-9]{5}", + "(?i)(mrn|medical)(?-i)"); + + String output = bout.toString(); + assertThat(output, containsString("Findings: 2")); + assertThat(output, containsString("Info type: C_MRN")); + } } From 5091752554819d56215ff8f495780a71a1b28570 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 11 Jun 2020 11:08:04 -0700 Subject: [PATCH 088/406] samples: Inspect gcs sample b 157050959 (#3146) Fixes internal bug b/157050959 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] **Tests** pass: `mvn clean verify` **required** - [X] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [X] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [X] Please **merge** this PR for me once it is approved. --- .../java/dlp/snippets/InspectGcsFile.java | 6 +- .../snippets/InspectGcsFileWithSampling.java | 174 ++++++++++++++++++ .../test/java/dlp/snippets/InspectTests.java | 10 + 3 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 441791c8535..18a5e053377 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -66,9 +66,11 @@ public static void inspectGcsFile( // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the GCS file to be inspected. - FileSet fileSet = FileSet.newBuilder().setUrl(gcsUri).build(); CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder().setFileSet(fileSet).build(); + CloudStorageOptions.newBuilder() + .setFileSet(FileSet.newBuilder().setUrl(gcsUri)) + .build(); + StorageConfig storageConfig = StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java new file mode 100644 index 00000000000..882cb7519d4 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -0,0 +1,174 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_gcs] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.CloudStorageOptions; +import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; +import com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FileType; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.Likelihood; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class InspectGcsFileWithSampling { + + public static void inspectGcsFileWithSampling() + throws InterruptedException, ExecutionException, IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/file.txt"; + String topicId = "your-pubsub-topic-id"; + String subscriptionId = "your-pubsub-subscription-id"; + inspectGcsFileWithSampling(projectId, gcsUri, topicId, subscriptionId); + } + + // Inspects a file in a Google Cloud Storage Bucket. + public static void inspectGcsFileWithSampling( + String projectId, String gcsUri, String topicId, String subscriptionId) + throws ExecutionException, InterruptedException, IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the GCS file to be inspected and sampling configuration + CloudStorageOptions cloudStorageOptions = + CloudStorageOptions.newBuilder() + .setFileSet(FileSet.newBuilder().setUrl(gcsUri)) + .setBytesLimitPerFile(200) + .addFileTypes(FileType.TEXT_FILE) + .setFilesLimitPercent(90) + .setSampleMethod(SampleMethod.RANDOM_START) + .build(); + + StorageConfig storageConfig = + StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("PERSON_NAME").build(); + + // Specify how the content should be inspected. + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addInfoTypes(infoType) + .setExcludeInfoTypes(true) + .setIncludeQuote(true) + .setMinLikelihood(Likelihood.POSSIBLE) + .build(); + + // Specify the action that is triggered when the job completes. + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the long running job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Create the request for the job configured above. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Use the client to send the request. + final DlpJob dlpJob = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + dlpJob.getName()); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for the original job to complete + try { + done.get(15, TimeUnit.MINUTES); + } catch (TimeoutException e) { + System.out.println("Job was not completed after 15 minutes."); + return; + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); + } + + // Get the latest state of the job from the service + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + DlpJob completedJob = dlp.getDlpJob(request); + + // Parse the response and process results. + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); + System.out.println("Findings: "); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); + } + } + } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_inspect_gcs] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 6c3d9048115..c32ce4490c9 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -343,6 +343,16 @@ public void testInspectGcsFile() throws Exception { assertThat(output, containsString("Job status: DONE")); } + @Test + public void testInspectGcsFileWithSampling() throws Exception { + InspectGcsFileWithSampling + .inspectGcsFileWithSampling(PROJECT_ID, GCS_PATH, topicName.getTopic(), + subscriptionName.getSubscription()); + + String output = bout.toString(); + assertThat(output, containsString("Job status: DONE")); + } + @Test public void testInspectDatastoreEntity() throws Exception { InspectDatastoreEntity From d29a7a0356cf8c3daab28dac688a29c4e4f58603 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Thu, 11 Jun 2020 13:44:04 -0700 Subject: [PATCH 089/406] samples: Create Java code sample for inspect BQ with sampling (#3149) Fixes internal bug b/157051267 - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) (**Nothing new**) - [X] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [X] **Tests** pass: `mvn clean verify` **required** - [X] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [X] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [X] Please **merge** this PR for me once it is approved. --- .../InspectBigQueryTableWithSampling.java | 176 ++++++++++++++++++ .../snippets/InspectGcsFileWithSampling.java | 4 +- .../test/java/dlp/snippets/InspectTests.java | 12 +- 3 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java new file mode 100644 index 00000000000..c5cb64ca5c6 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -0,0 +1,176 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_inspect_bigquery_with_sampling] + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.pubsub.v1.AckReplyConsumer; +import com.google.cloud.pubsub.v1.MessageReceiver; +import com.google.cloud.pubsub.v1.Subscriber; +import com.google.privacy.dlp.v2.Action; +import com.google.privacy.dlp.v2.BigQueryOptions; +import com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod; +import com.google.privacy.dlp.v2.BigQueryTable; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeStats; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectDataSourceDetails; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.StorageConfig; +import com.google.pubsub.v1.ProjectSubscriptionName; +import com.google.pubsub.v1.PubsubMessage; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class InspectBigQueryTableWithSampling { + + public static void inspectBigQueryTableWithSampling() + throws InterruptedException, ExecutionException, IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String topicId = "your-pubsub-topic-id"; + String subscriptionId = "your-pubsub-subscription-id"; + inspectBigQueryTableWithSampling(projectId, topicId, subscriptionId); + } + + // Inspects a BigQuery Table + public static void inspectBigQueryTableWithSampling( + String projectId, String topicId, String subscriptionId) + throws ExecutionException, InterruptedException, IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the BigQuery table to be inspected. + BigQueryTable tableReference = + BigQueryTable.newBuilder() + .setProjectId("bigquery-public-data") + .setDatasetId("usa_names") + .setTableId("usa_1910_current") + .build(); + + BigQueryOptions bigQueryOptions = + BigQueryOptions.newBuilder() + .setTableReference(tableReference) + .setRowsLimit(1000) + .setSampleMethod(SampleMethod.RANDOM_START) + .addIdentifyingFields(FieldId.newBuilder().setName("name")) + .build(); + + StorageConfig storageConfig = + StorageConfig.newBuilder().setBigQueryOptions(bigQueryOptions).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("PERSON_NAME").build(); + + // Specify how the content should be inspected. + InspectConfig inspectConfig = + InspectConfig.newBuilder() + .addInfoTypes(infoType) + .setIncludeQuote(true) + .build(); + + // Specify the action that is triggered when the job completes. + String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); + Action.PublishToPubSub publishToPubSub = + Action.PublishToPubSub.newBuilder().setTopic(pubSubTopic).build(); + Action action = Action.newBuilder().setPubSub(publishToPubSub).build(); + + // Configure the long running job we want the service to perform. + InspectJobConfig inspectJobConfig = + InspectJobConfig.newBuilder() + .setStorageConfig(storageConfig) + .setInspectConfig(inspectConfig) + .addActions(action) + .build(); + + // Create the request for the job configured above. + CreateDlpJobRequest createDlpJobRequest = + CreateDlpJobRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setInspectJob(inspectJobConfig) + .build(); + + // Use the client to send the request. + final DlpJob dlpJob = dlp.createDlpJob(createDlpJobRequest); + System.out.println("Job created: " + dlpJob.getName()); + + // Set up a Pub/Sub subscriber to listen on the job completion status + final SettableApiFuture done = SettableApiFuture.create(); + + ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of(projectId, subscriptionId); + + MessageReceiver messageHandler = + (PubsubMessage pubsubMessage, AckReplyConsumer ackReplyConsumer) -> { + handleMessage(dlpJob, done, pubsubMessage, ackReplyConsumer); + }; + Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); + subscriber.startAsync(); + + // Wait for the original job to complete + try { + done.get(15, TimeUnit.MINUTES); + } catch (TimeoutException e) { + System.out.println("Job was not completed after 15 minutes."); + return; + } finally { + subscriber.stopAsync(); + subscriber.awaitTerminated(); + } + + // Get the latest state of the job from the service + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(dlpJob.getName()).build(); + DlpJob completedJob = dlp.getDlpJob(request); + + // Parse the response and process results. + System.out.println("Job status: " + completedJob.getState()); + InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); + System.out.println("Findings: "); + for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { + System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); + System.out.println("\tCount: " + infoTypeStat.getCount()); + } + } + } + + // handleMessage injects the job and settableFuture into the message reciever interface + private static void handleMessage( + DlpJob job, + SettableApiFuture done, + PubsubMessage pubsubMessage, + AckReplyConsumer ackReplyConsumer) { + String messageAttribute = pubsubMessage.getAttributesMap().get("DlpJobName"); + if (job.getName().equals(messageAttribute)) { + done.set(true); + ackReplyConsumer.ack(); + } else { + ackReplyConsumer.nack(); + } + } +} +// [END dlp_inspect_bigquery_with_sampling] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java index 882cb7519d4..380fbfc04ef 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -16,7 +16,7 @@ package dlp.snippets; -// [START dlp_inspect_gcs] +// [START dlp_inspect_gcs_with_sampling] import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; @@ -171,4 +171,4 @@ private static void handleMessage( } } } -// [END dlp_inspect_gcs] +// [END dlp_inspect_gcs_with_sampling] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index c32ce4490c9..d888316596a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -225,7 +225,7 @@ public void testInspectStringWithoutOverlap() throws Exception { assertThat(output, containsString("example.com")); assertThat(output, not(containsString("example.org"))); } - + @Test public void testInspectTable() { Table tableToInspect = Table.newBuilder() @@ -373,6 +373,16 @@ public void testInspectBigQueryTable() throws Exception { assertThat(output, containsString("Job status: DONE")); } + @Test + public void testInspectBigQueryTableWithSampling() throws Exception { + InspectBigQueryTableWithSampling + .inspectBigQueryTableWithSampling(PROJECT_ID, topicName.getTopic(), + subscriptionName.getSubscription()); + + String output = bout.toString(); + assertThat(output, containsString("Job status: DONE")); + } + @Test public void testInspectWithHotwordRules() throws Exception { InspectWithHotwordRules.inspectWithHotwordRules( From b6b5951e533919bb628583b6c524abc99c40eb25 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Fri, 12 Jun 2020 10:43:47 -0700 Subject: [PATCH 090/406] samples: Add Java code samples for replacement with infotype (#3155) To be linked from https://cloud.google.com/dlp/docs/redacting-sensitive-data --- .../dlp/snippets/DeIdentifyWithInfoType.java | 94 +++++++++++++++++++ .../dlp/snippets/DeIdentificationTests.java | 11 +++ 2 files changed, 105 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java new file mode 100644 index 00000000000..fc8436cf9eb --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_infotype] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import java.io.IOException; + +public class DeIdentifyWithInfoType { + + public static void deIdentifyWithInfoType() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + String textToInspect = + "My email is test@example.com"; + deIdentifyWithInfoType(projectId, textToInspect); + } + + public static void deIdentifyWithInfoType(String projectId, String textToRedact) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify the content to be inspected. + ContentItem item = ContentItem.newBuilder() + .setValue(textToRedact).build(); + + // Specify the type of info the inspection will look for. + // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types + InfoType infoType = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); + InspectConfig inspectConfig = InspectConfig.newBuilder().addInfoTypes(infoType).build(); + // Specify replacement string to be used for the finding. + ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = + ReplaceWithInfoTypeConfig.newBuilder().build(); + // Define type of deidentification as replacement with info type. + PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig) + .build(); + // Associate deidentification type with info type. + InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + // Construct the configuration for the Redact request and list all desired transformations. + DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() + .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() + .addTransformations(transformation)) + .build(); + + // Construct the Redact request to be sent by the client. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) + .setDeidentifyConfig(redactConfig) + .setInspectConfig(inspectConfig) + .build(); + + // Use the client to send the API request. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Parse the response and process results + System.out.println("Text after redaction: " + response.getItem().getValue()); + } + } +} +// [END dlp_deidentify_replace] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index e1406635286..f9f5f1c0f2c 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -200,6 +200,17 @@ public void testDeIdentifyWithReplacement() throws IOException { + "My name is Alicia Abernathy, and my email address is [email-address].")); } + @Test + public void testDeIdentifyWithInfoType() throws IOException { + DeIdentifyWithInfoType.deIdentifyWithInfoType( + PROJECT_ID, + "My email is test@example.com"); + + String output = bout.toString(); + assertThat(output, containsString("Text after redaction: " + + "My email is [EMAIL_ADDRESS]")); + } + @Test public void testDeIdentifyWithSimpleWordList() throws IOException { DeIdentifyWithSimpleWordList.deidentifyWithSimpleWordList( From 455abee52042f2bbdba9375d4190bc3dd6d5df2f Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Fri, 12 Jun 2020 14:48:11 -0700 Subject: [PATCH 091/406] samples: dlp: Update README instructions to remove uberjar info (#3167) Fixes #issue > It's a good idea to open an issue first for discussion. - [x] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [x] `pom.xml` parent set to latest `shared-configuration` - [x] Appropriate changes to README are included in PR - [ ] API's need to be enabled to test (tell us) - [ ] Environment Variables need to be set (ask us to set them) - [x] **Tests** pass: `mvn clean verify` **required** - [x] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [ ] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [x] Please **merge** this PR for me once it is approved. --- .../src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyWithDateShift.java | 2 +- .../main/java/dlp/snippets/DeIdentifyWithExceptionList.java | 2 +- .../snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyWithInfoType.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyWithMasking.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyWithRedaction.java | 2 +- .../src/main/java/dlp/snippets/DeIdentifyWithReplacement.java | 2 +- .../main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java | 2 +- .../src/main/java/dlp/snippets/InspectBigQueryTable.java | 3 +-- .../java/dlp/snippets/InspectBigQueryTableWithSampling.java | 3 +-- .../src/main/java/dlp/snippets/InspectDatastoreEntity.java | 3 +-- .../snippets/src/main/java/dlp/snippets/InspectGcsFile.java | 2 +- .../src/main/java/dlp/snippets/InspectGcsFileWithSampling.java | 3 +-- .../snippets/src/main/java/dlp/snippets/InspectImageFile.java | 2 +- .../src/main/java/dlp/snippets/InspectPhoneNumber.java | 2 +- .../snippets/src/main/java/dlp/snippets/InspectString.java | 2 +- .../dlp/snippets/InspectStringCustomExcludingSubstring.java | 2 +- .../src/main/java/dlp/snippets/InspectStringCustomHotword.java | 2 +- .../main/java/dlp/snippets/InspectStringCustomOmitOverlap.java | 2 +- .../src/main/java/dlp/snippets/InspectStringMultipleRules.java | 2 +- .../src/main/java/dlp/snippets/InspectStringOmitOverlap.java | 2 +- .../main/java/dlp/snippets/InspectStringWithExclusionDict.java | 2 +- .../dlp/snippets/InspectStringWithExclusionDictSubstring.java | 2 +- .../java/dlp/snippets/InspectStringWithExclusionRegex.java | 2 +- .../main/java/dlp/snippets/InspectStringWithoutOverlap.java | 2 +- .../snippets/src/main/java/dlp/snippets/InspectTable.java | 2 +- .../snippets/src/main/java/dlp/snippets/InspectTextFile.java | 2 +- .../src/main/java/dlp/snippets/InspectWithCustomRegex.java | 2 +- .../src/main/java/dlp/snippets/InspectWithHotwordRules.java | 2 +- .../snippets/src/main/java/dlp/snippets/JobsCreate.java | 3 ++- .../snippets/src/main/java/dlp/snippets/JobsDelete.java | 2 +- dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java | 3 ++- dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java | 2 +- .../src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java | 2 +- .../src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java | 2 +- .../snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java | 2 +- .../main/java/dlp/snippets/RiskAnalysisCategoricalStats.java | 3 +-- .../src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java | 3 +-- .../snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java | 2 +- .../src/main/java/dlp/snippets/RiskAnalysisLDiversity.java | 3 +-- .../src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java | 3 +-- .../snippets/src/main/java/dlp/snippets/TemplatesCreate.java | 2 +- .../snippets/src/main/java/dlp/snippets/TemplatesDelete.java | 2 +- .../snippets/src/main/java/dlp/snippets/TemplatesList.java | 2 +- .../snippets/src/main/java/dlp/snippets/TriggersCreate.java | 2 +- .../snippets/src/main/java/dlp/snippets/TriggersDelete.java | 2 +- .../snippets/src/main/java/dlp/snippets/TriggersList.java | 2 +- 49 files changed, 51 insertions(+), 57 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java index 2619f8c2555..0d57d368ff4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java @@ -46,7 +46,7 @@ public class DeIdentifyTableWithFpe { - public static void deIdentifyTableWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String kmsKeyName = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java index 870120587e5..8922db0b471 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java @@ -40,7 +40,7 @@ public class DeIdentifyTextWithFpe { - public static void deIdentifyTextWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToDeIdentify = "I'm Gary and my email is gary@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java index a096c5cd99d..abbc2dae5c3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java @@ -47,7 +47,7 @@ public class DeIdentifyWithDateShift { - public static void deIdentifyWithDateShift() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; Path inputCsvFile = Paths.get("path/to/your/input/file.csv"); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java index 5aab72d1f7e..55a875f9c86 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java @@ -37,7 +37,7 @@ public class DeIdentifyWithExceptionList { - public static void deIdentifyWithExceptionList() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToDeIdentify = "jack@example.org accessed customer record of user5@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java index 7633e91dad7..bb947c9a677 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java @@ -40,7 +40,7 @@ public class DeIdentifyWithFpe { - public static void deIdentifyWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToDeIdentify = "I'm Gary and my email is gary@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java index fc8436cf9eb..0899c2bbf1c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java @@ -34,7 +34,7 @@ public class DeIdentifyWithInfoType { - public static void deIdentifyWithInfoType() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java index 772ba46bfbf..5d387688c0a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java @@ -36,7 +36,7 @@ public class DeIdentifyWithMasking { - public static void deIdentifyWithMasking() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToDeIdentify = "My SSN is 372819127"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java index c7cd88f337d..a4fca89df70 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java @@ -33,7 +33,7 @@ public class DeIdentifyWithRedaction { - public static void deIdentifyWithRedaction() { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java index c070fefe36d..824bd8d3db3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java @@ -35,7 +35,7 @@ public class DeIdentifyWithReplacement { - public static void deIdentifyWithReplacement() { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java index 9cb708bd014..b31510c5100 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java @@ -37,7 +37,7 @@ public class DeIdentifyWithSimpleWordList { - public static void deIdentifyWithSimpleWordList() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToDeIdentify = "Patient was seen in RM-YELLOW then transferred to rm green."; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index 537df75044c..c925d67b0cc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -48,8 +48,7 @@ public class InspectBigQueryTable { - public static void inspectBigQueryTable() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String bigQueryDatasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java index c5cb64ca5c6..e4a63956637 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -47,8 +47,7 @@ public class InspectBigQueryTableWithSampling { - public static void inspectBigQueryTableWithSampling() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String topicId = "your-pubsub-topic-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index 588e9f837bb..3b1d7f048da 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -49,8 +49,7 @@ public class InspectDatastoreEntity { - public static void insepctDatastoreEntity() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datastoreNamespace = "your-datastore-namespace"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 18a5e053377..1a1c00c77be 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -48,7 +48,7 @@ public class InspectGcsFile { - public static void inspectGcsFile() throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/file.txt"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java index 380fbfc04ef..e868b4998bd 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -48,8 +48,7 @@ public class InspectGcsFileWithSampling { - public static void inspectGcsFileWithSampling() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsUri = "gs://" + "your-bucket-name" + "/path/to/your/file.txt"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 26449c13ba4..2103b008818 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -36,7 +36,7 @@ public class InspectImageFile { - public static void inspectImageFile() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String filePath = "path/to/image.png"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java index be35395b1c9..6c21e8bd43a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java @@ -31,7 +31,7 @@ public class InspectPhoneNumber { - public static void inspectString() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "My name is Gary and my email is gary@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index 9b32a16a40a..80c5040c8d3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -35,7 +35,7 @@ public class InspectString { - public static void inspectString() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "My name is Gary and my email is gary@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java index 9d1c0cb41ed..1201a3643f4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java @@ -43,7 +43,7 @@ public class InspectStringCustomExcludingSubstring { - public static void inspectStringCustomExcludingSubstring() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Name: Doe, John. Name: Example, Jimmy"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java index 831ed379d63..a5408f9f68e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java @@ -40,7 +40,7 @@ public class InspectStringCustomHotword { - public static void inspectStringCustomHotword() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "patient name: John Doe"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java index add7f2a3cb6..0cf017f3436 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java @@ -41,7 +41,7 @@ public class InspectStringCustomOmitOverlap { - public static void inspectStringCustomOmitOverlap() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Name: Jane Doe. Name: Larry Page."; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java index 2de29404ad6..821cfab1117 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java @@ -44,7 +44,7 @@ public class InspectStringMultipleRules { - public static void inspectStringMultipleRules() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "patient: Jane Doe"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java index 858b228ab25..6786a290d49 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java @@ -40,7 +40,7 @@ public class InspectStringOmitOverlap { - public static void inspectStringOmitOverlap() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "james@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java index 270c040c0a3..a73bffc08c6 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -42,7 +42,7 @@ public class InspectStringWithExclusionDict { - public static void inspectStringWithExclusionDict() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, example@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java index 59da8e2a6ac..e0f836ee4f9 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java @@ -42,7 +42,7 @@ public class InspectStringWithExclusionDictSubstring { - public static void inspectStringWithExclusionDictSubstring() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, TEST@example.com"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java index 5bd2541b100..a8a6d7dbaa4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java @@ -40,7 +40,7 @@ public class InspectStringWithExclusionRegex { - public static void inspectStringWithExclusionRegex() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Some email addresses: gary@example.com, bob@example.org"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java index ddb2f0b7d30..85d9a5abff2 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java @@ -42,7 +42,7 @@ public class InspectStringWithoutOverlap { - public static void inspectStringWithoutOverlap() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "example.com is a domain, james@example.org is an email."; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java index bf7347da330..c25488ff29b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java @@ -40,7 +40,7 @@ public class InspectTable { - public static void inspectTable() { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; Table tableToInspect = Table.newBuilder() diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index 789bcd29905..c83fb98423b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -36,7 +36,7 @@ public class InspectTextFile { - public static void inspectTextFile() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String filePath = "path/to/file.txt"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java index 5864c38acf0..9d4e96510ab 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java @@ -36,7 +36,7 @@ public class InspectWithCustomRegex { - public static void inspectWithCustomRegex() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Patients MRN 444-5-22222"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java index 2eb1e002742..ad221d47b76 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java @@ -41,7 +41,7 @@ public class InspectWithHotwordRules { - public static void inspectWithHotwordRules() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToInspect = "Patient's MRN 444-5-22222 and just a number 333-2-33333"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java index 40775745e6f..54325579721 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java @@ -36,7 +36,8 @@ import java.util.stream.Stream; public class JobsCreate { - public static void createJobs() throws IOException { + + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java index d751c8e2cdc..c3000d69fd2 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java @@ -24,7 +24,7 @@ import java.io.IOException; public class JobsDelete { - public static void deleteJobs() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String jobId = "your-job-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java index 7d6ab2e9eb4..9f43eccc93e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java @@ -24,7 +24,8 @@ import java.io.IOException; public class JobsGet { - public static void getJobs() throws IOException { + + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String jobId = "your-job-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java index 28794d157ac..892f58e1586 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java @@ -27,7 +27,7 @@ public class JobsList { - public static void listJobs() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; listJobs(projectId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java index 598ae547423..6373698981d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java @@ -47,7 +47,7 @@ public class ReIdentifyTableWithFpe { - public static void reIdentifyTableWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String kmsKeyName = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java index a82885a5fd1..1ccdb58ecf2 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java @@ -41,7 +41,7 @@ public class ReIdentifyTextWithFpe { - public static void reIdentifyTextWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToReIdentify = "My phone number is PHONE_TOKEN(10):9617256398"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java index 6958ac830f4..02c436cd2aa 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java @@ -41,7 +41,7 @@ public class ReIdentifyWithFpe { - public static void reIdentifyWithFpe() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String textToReIdentify = "My SSN is SSN_TOKEN(9):731997681"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index 492e295ca9c..0e51c691550 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -47,8 +47,7 @@ class RiskAnalysisCategoricalStats { - public static void categoricalStatsAnalysis() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index 634e2961534..ec6e1bb1226 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -51,8 +51,7 @@ class RiskAnalysisKAnonymity { - public static void calculateKAnonymity() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index d453f30f8a5..807c6f04e4f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -52,7 +52,7 @@ class RiskAnalysisKMap { - public static void calculateKMap() throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index bd8fa1af2ef..f9d0551853b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -52,8 +52,7 @@ class RiskAnalysisLDiversity { - public static void calculateLDiversity() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index 3cb1792e543..f677c62772f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -46,8 +46,7 @@ class RiskAnalysisNumericalStats { - public static void numericalStatsAnalysis() - throws InterruptedException, ExecutionException, IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String datasetId = "your-bigquery-dataset-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java index e95211ffb9b..fe8ef939bb1 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java @@ -31,7 +31,7 @@ class TemplatesCreate { - public static void createInspectTemplate() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; createInspectTemplate(projectId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java index d291c87e6bc..f22c362ff9f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java @@ -24,7 +24,7 @@ class TemplatesDelete { - public static void deleteInspectTemplate() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String templateId = "your-template-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java index cf84347be9a..729782f529b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java @@ -29,7 +29,7 @@ class TemplatesList { - public static void listInspectTemplates() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; listInspectTemplates(projectId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java index 0a01bc82b65..de0dd80dfd8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java @@ -37,7 +37,7 @@ public class TriggersCreate { - public static void createTrigger() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String gcsPath = "gs://" + "your-bucket-name" + "path/to/file.txt"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java index bb70d029f7a..539f2537dbc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java @@ -24,7 +24,7 @@ class TriggersDelete { - public static void deleteTrigger() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; String triggerId = "your-trigger-id"; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java index 30ebfbd6931..d52146399d7 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java @@ -25,7 +25,7 @@ import java.io.IOException; class TriggersList { - public static void listTriggers() throws IOException { + public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; listTriggers(projectId); From 49bcf01b63f2165e066cebac716c45f0673170bc Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Fri, 12 Jun 2020 18:00:04 -0700 Subject: [PATCH 092/406] samples: Clean up some ProjectName uses in DLP (#3166) Clean up some samples that got added with the old way of setting the parent field. See internal bug b/158100365 for context. - [X] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [X] `pom.xml` parent set to latest `shared-configuration` - [X] Appropriate changes to README are included in PR - [X] API's need to be enabled to test (tell us) - [X] Environment Variables need to be set (ask us to set them) - [X] **Tests** pass: `mvn clean verify` **required** - [X] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [X] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [X] Please **merge** this PR for me once it is approved. --- .../java/dlp/snippets/DeIdentifyWithExceptionList.java | 4 ++-- .../java/dlp/snippets/DeIdentifyWithSimpleWordList.java | 4 ++-- .../main/java/dlp/snippets/InspectWithCustomRegex.java | 8 ++------ .../main/java/dlp/snippets/InspectWithHotwordRules.java | 7 ++----- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java index 55a875f9c86..42c5c25d2d8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java @@ -30,8 +30,8 @@ import com.google.privacy.dlp.v2.InfoTypeTransformations; import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; import java.io.IOException; @@ -100,7 +100,7 @@ public static void deIdentifyWithExceptionList(String projectId, String textToDe // Combine configurations into a request for the service. DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(contentItem) .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java index b31510c5100..993277a0b90 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java @@ -30,8 +30,8 @@ import com.google.privacy.dlp.v2.InfoTypeTransformations; import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; import java.io.IOException; @@ -95,7 +95,7 @@ public static void deidentifyWithSimpleWordList(String projectId, String textToD // Combine configurations into a request for the service. DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of(projectId).toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(contentItem) .setInspectConfig(inspectConfig) .setDeidentifyConfig(deidentifyConfig) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java index 9d4e96510ab..5baf820ed29 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java @@ -30,7 +30,7 @@ import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.IOException; @@ -51,9 +51,6 @@ public static void inspectWithCustomRegex( // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteContentItem byteItem = ByteContentItem.newBuilder() @@ -84,8 +81,7 @@ public static void inspectWithCustomRegex( // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) - .setItem(item) + .setParent(LocationName.of(projectId, "global").toString()).setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java index ad221d47b76..39c253279bf 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java @@ -35,7 +35,7 @@ import com.google.privacy.dlp.v2.InspectionRule; import com.google.privacy.dlp.v2.InspectionRuleSet; import com.google.privacy.dlp.v2.Likelihood; -import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.LocationName; import com.google.protobuf.ByteString; import java.io.IOException; @@ -58,9 +58,6 @@ public static void inspectWithHotwordRules( // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { - // Specify the project used for request. - ProjectName project = ProjectName.of(projectId); - // Specify the type and content to be inspected. ByteContentItem byteItem = ByteContentItem.newBuilder() @@ -111,7 +108,7 @@ public static void inspectWithHotwordRules( // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(project.toString()) + .setParent(LocationName.of(projectId, "global").toString()) .setItem(item) .setInspectConfig(config) .build(); From 77a2824805c93af225e0ecfdac575cbcc34b9f58 Mon Sep 17 00:00:00 2001 From: jakubrauch Date: Sat, 13 Jun 2020 12:31:21 -0700 Subject: [PATCH 093/406] samples: Add Java code samples for de-id tabular data (#3170) To be linked from https://cloud.google.com/dlp/docs/examples-deid-tables --- .../snippets/DeIdentifyTableBucketing.java | 121 ++++++++ .../DeIdentifyTableConditionInfoTypes.java | 163 ++++++++++ .../DeIdentifyTableConditionMasking.java | 140 +++++++++ .../snippets/DeIdentifyTableInfoTypes.java | 142 +++++++++ .../snippets/DeIdentifyTableRowSuppress.java | 120 ++++++++ .../dlp/snippets/DeIdentificationTests.java | 278 ++++++++++++++++++ 6 files changed, 964 insertions(+) create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java create mode 100644 dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java new file mode 100644 index 00000000000..055c19c7658 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_bucketing] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.FixedSizeBucketingConfig; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import java.io.IOException; + +public class DeIdentifyTableBucketing { + + public static void deIdentifyTableBucketing() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + deIdentifyTableBucketing(projectId, tableToDeIdentify); + } + + public static Table deIdentifyTableBucketing(String projectId, Table tableToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify how the content should be de-identified. + FixedSizeBucketingConfig fixedSizeBucketingConfig = + FixedSizeBucketingConfig.newBuilder() + .setBucketSize(10) + .setLowerBound(Value.newBuilder().setIntegerValue(0).build()) + .setUpperBound(Value.newBuilder().setIntegerValue(100).build()) + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setFixedSizeBucketingConfig(fixedSizeBucketingConfig) + .build(); + + // Specify field to be encrypted. + FieldId fieldId = FieldId.newBuilder().setName("HAPPINESS SCORE").build(); + + // Associate the encryption with the specified field. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addFields(fieldId) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after de-identification: " + response.getItem().getTable()); + + return response.getItem().getTable(); + } + } +} +// [END dlp_deidentify_table_bucketing] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java new file mode 100644 index 00000000000..0737f97b903 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java @@ -0,0 +1,163 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_condition_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordCondition; +import com.google.privacy.dlp.v2.RecordCondition.Condition; +import com.google.privacy.dlp.v2.RecordCondition.Conditions; +import com.google.privacy.dlp.v2.RecordCondition.Expressions; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.RelationalOperator; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class DeIdentifyTableConditionInfoTypes { + + public static void deIdentifyTableConditionInfoTypes() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in Jane Austen's novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + + deIdentifyTableConditionInfoTypes(projectId, tableToDeIdentify); + } + + public static Table deIdentifyTableConditionInfoTypes(String projectId, Table tableToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify how the content should be de-identified. + // Select type of info to be replaced. + InfoType infoType = InfoType.newBuilder().setName("PERSON_NAME").build(); + // Specify that findings should be replaced with corresponding info type name. + ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = + ReplaceWithInfoTypeConfig.getDefaultInstance(); + PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig).build(); + // Associate info type with the replacement strategy + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + InfoTypeTransformations infoTypeTransformations = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformation) + .build(); + + // Specify fields to be de-identified. + List fieldIds = Stream.of("PATIENT", "FACTOID") + .map(id -> FieldId.newBuilder().setName(id).build()) + .collect(Collectors.toList()); + + // Specify when the above fields should be de-identified. + Condition condition = Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()) + .build(); + // Apply the condition to records + RecordCondition recordCondition = RecordCondition.newBuilder() + .setExpressions(Expressions.newBuilder() + .setConditions(Conditions.newBuilder() + .addConditions(condition) + .build()) + .build()) + .build(); + + // Associate the de-identification and conditions with the specified fields. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setInfoTypeTransformations(infoTypeTransformations) + .addAllFields(fieldIds) + .setCondition(recordCondition) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after de-identification: " + response.getItem().getTable()); + + return response.getItem().getTable(); + } + } +} +// [END dlp_deidentify_table_condition_infotypes] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java new file mode 100644 index 00000000000..71083fe6276 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_condition_masking] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.CharacterMaskConfig; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordCondition; +import com.google.privacy.dlp.v2.RecordCondition.Condition; +import com.google.privacy.dlp.v2.RecordCondition.Conditions; +import com.google.privacy.dlp.v2.RecordCondition.Expressions; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.RelationalOperator; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import java.io.IOException; + +public class DeIdentifyTableConditionMasking { + + public static void deIdentifyTableConditionMasking() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + deIdentifyTableConditionMasking(projectId, tableToDeIdentify); + } + + public static Table deIdentifyTableConditionMasking(String projectId, Table tableToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify how the content should be de-identified. + CharacterMaskConfig characterMaskConfig = + CharacterMaskConfig.newBuilder() + .setMaskingCharacter("*") + .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setCharacterMaskConfig(characterMaskConfig) + .build(); + + // Specify field to be de-identified. + FieldId fieldId = FieldId.newBuilder().setName("HAPPINESS SCORE").build(); + + // Specify when the above field should be de-identified. + Condition condition = Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()) + .build(); + // Apply the condition to records + RecordCondition recordCondition = RecordCondition.newBuilder() + .setExpressions(Expressions.newBuilder() + .setConditions(Conditions.newBuilder() + .addConditions(condition) + .build()) + .build()) + .build(); + + // Associate the de-identification and conditions with the specified field. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setPrimitiveTransformation(primitiveTransformation) + .addFields(fieldId) + .setCondition(recordCondition) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after de-identification: " + response.getItem().getTable()); + + return response.getItem().getTable(); + } + } +} +// [END dlp_deidentify_table_condition_masking] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java new file mode 100644 index 00000000000..56070bdb678 --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_infotypes] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.FieldTransformation; +import com.google.privacy.dlp.v2.InfoType; +import com.google.privacy.dlp.v2.InfoTypeTransformations; +import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.PrimitiveTransformation; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +public class DeIdentifyTableInfoTypes { + + public static void deIdentifyTableInfoTypes() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in Jane Austen's novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + + deIdentifyTableInfoTypes(projectId, tableToDeIdentify); + } + + public static Table deIdentifyTableInfoTypes(String projectId, Table tableToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify how the content should be de-identified. + // Select type of info to be replaced. + InfoType infoType = InfoType.newBuilder().setName("PERSON_NAME").build(); + // Specify that findings should be replaced with corresponding info type name. + ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = + ReplaceWithInfoTypeConfig.getDefaultInstance(); + PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig).build(); + // Associate info type with the replacement strategy + InfoTypeTransformation infoTypeTransformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); + InfoTypeTransformations infoTypeTransformations = + InfoTypeTransformations.newBuilder() + .addTransformations(infoTypeTransformation) + .build(); + + // Specify fields to be de-identified. + List fieldIds = Stream.of("PATIENT", "FACTOID") + .map(id -> FieldId.newBuilder().setName(id).build()) + .collect(Collectors.toList()); + + // Associate the de-identification and conditions with the specified field. + FieldTransformation fieldTransformation = + FieldTransformation.newBuilder() + .setInfoTypeTransformations(infoTypeTransformations) + .addAllFields(fieldIds) + .build(); + RecordTransformations transformations = + RecordTransformations.newBuilder().addFieldTransformations(fieldTransformation).build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after de-identification: " + response.getItem().getTable()); + + return response.getItem().getTable(); + } + } +} +// [END dlp_deidentify_table_infotypes] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java new file mode 100644 index 00000000000..db573ee3b9f --- /dev/null +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +// [START dlp_deidentify_table_row_suppress] + +import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.FieldId; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.RecordCondition; +import com.google.privacy.dlp.v2.RecordCondition.Condition; +import com.google.privacy.dlp.v2.RecordCondition.Conditions; +import com.google.privacy.dlp.v2.RecordCondition.Expressions; +import com.google.privacy.dlp.v2.RecordSuppression; +import com.google.privacy.dlp.v2.RecordTransformations; +import com.google.privacy.dlp.v2.RelationalOperator; +import com.google.privacy.dlp.v2.Table; +import com.google.privacy.dlp.v2.Table.Row; +import com.google.privacy.dlp.v2.Value; +import java.io.IOException; + +public class DeIdentifyTableRowSuppress { + + public static void deIdentifyTableRowSuppress() throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "your-project-id"; + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + deIdentifyTableRowSuppress(projectId, tableToDeIdentify); + } + + public static Table deIdentifyTableRowSuppress(String projectId, Table tableToDeIdentify) + throws IOException { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (DlpServiceClient dlp = DlpServiceClient.create()) { + // Specify what content you want the service to de-identify. + ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); + + // Specify when the content should be de-identified. + Condition condition = Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()).build(); + // Apply the condition to record suppression. + RecordSuppression recordSuppressions = + RecordSuppression.newBuilder() + .setCondition(RecordCondition.newBuilder() + .setExpressions(Expressions.newBuilder() + .setConditions(Conditions.newBuilder().addConditions(condition).build()) + .build()) + .build()) + .build(); + // Use record suppression as the only transformation + RecordTransformations transformations = + RecordTransformations.newBuilder() + .addRecordSuppressions(recordSuppressions) + .build(); + + DeidentifyConfig deidentifyConfig = + DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); + + // Combine configurations into a request for the service. + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(contentItem) + .setDeidentifyConfig(deidentifyConfig) + .build(); + + // Send the request and receive response from the service. + DeidentifyContentResponse response = dlp.deidentifyContent(request); + + // Print the results. + System.out.println( + "Table after de-identification: " + response.getItem().getTable()); + + return response.getItem().getTable(); + } + } +} +// [END dlp_deidentify_table_row_suppress] diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index f9f5f1c0f2c..3c999d80654 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -18,6 +18,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import com.google.privacy.dlp.v2.FieldId; @@ -163,6 +164,283 @@ public void testReIdentifyTableWithFpe() throws IOException { assertThat(output, containsString("Table after re-identification:")); } + @Test + public void testDeIdentifyTableBucketing() throws IOException { + // Transform a column based on the value of another column + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("90:100").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("20:30").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("70:80").build()) + .build()) + .build(); + + Table table = DeIdentifyTableBucketing.deIdentifyTableBucketing(PROJECT_ID, tableToDeIdentify); + + String output = bout.toString(); + assertThat(output, containsString("Table after de-identification:")); + assertEquals(expectedTable, table); + } + + @Test + public void testDeIdentifyTableConditionMasking() throws IOException { + // Transform a column based on the value of another column + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("**").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + Table table = DeIdentifyTableConditionMasking.deIdentifyTableConditionMasking( + PROJECT_ID, tableToDeIdentify); + + String output = bout.toString(); + assertThat(output, containsString("Table after de-identification:")); + assertEquals(expectedTable, table); + } + + @Test + public void testDeIdentifyTableInfoTypes() throws IOException { + // Transform findings found in column + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in Jane Austen's novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + Table expectedTable = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "[PERSON_NAME] name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in [PERSON_NAME] novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME] loved cats.").build()) + .build()) + .build(); + + Table table = DeIdentifyTableInfoTypes.deIdentifyTableInfoTypes(PROJECT_ID, tableToDeIdentify); + + String output = bout.toString(); + assertThat(output, containsString("Table after de-identification:")); + assertEquals(expectedTable, table); + } + + @Test + public void testDeIdentifyTableRowSuppress() throws IOException { + // Suppress a row based on the content of a column + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + Table table = DeIdentifyTableRowSuppress.deIdentifyTableRowSuppress( + PROJECT_ID, tableToDeIdentify); + + String output = bout.toString(); + assertThat(output, containsString("Table after de-identification:")); + assertEquals(expectedTable, table); + } + + @Test + public void testDeIdentifyTableConditionsInfoTypes() throws IOException { + // Transform findings only when specific conditions are met on another field + Table tableToDeIdentify = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in Jane Austen's novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + Table expectedTable = Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues(Value.newBuilder().setStringValue( + "[PERSON_NAME] name was a curse, possibly invented by Shakespeare.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues(Value.newBuilder().setStringValue( + "There are 14 kisses in Jane Austen's novels.").build()) + .build()) + .addRows(Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + + Table table = DeIdentifyTableConditionInfoTypes.deIdentifyTableConditionInfoTypes( + PROJECT_ID, tableToDeIdentify); + + String output = bout.toString(); + assertThat(output, containsString("Table after de-identification:")); + assertEquals(expectedTable, table); + } + @Test public void testDeIdentifyWithDateShift() throws IOException { Path inputFile = Paths.get("src/test/resources/dates.csv"); From 2eaf953c02d4827c21f1c838980f179f638d7a2c Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Wed, 17 Jun 2020 13:40:05 -0700 Subject: [PATCH 094/406] samples: Make pubsub handling consistent across inspect and risk DLP samples (#3190) Fixes #3180 - [x] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [x] `pom.xml` parent set to latest `shared-configuration` - [x] Appropriate changes to README are included in PR - [ ] API's need to be enabled to test (tell us) (**Nothing new**) - [ ] Environment Variables need to be set (ask us to set them) (**Nothing new**) - [x] **Tests** pass: `mvn clean verify` **required** - [x] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [x] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [x] Please **merge** this PR for me once it is approved. --- .../src/main/java/dlp/snippets/InspectBigQueryTable.java | 3 ++- .../java/dlp/snippets/InspectBigQueryTableWithSampling.java | 3 ++- .../src/main/java/dlp/snippets/InspectDatastoreEntity.java | 3 ++- .../snippets/src/main/java/dlp/snippets/InspectGcsFile.java | 3 ++- .../main/java/dlp/snippets/InspectGcsFileWithSampling.java | 3 ++- .../java/dlp/snippets/RiskAnalysisCategoricalStats.java | 6 +++--- .../src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java | 6 +++--- .../src/main/java/dlp/snippets/RiskAnalysisKMap.java | 6 +++--- .../src/main/java/dlp/snippets/RiskAnalysisLDiversity.java | 6 +++--- .../main/java/dlp/snippets/RiskAnalysisNumericalStats.java | 6 +++--- 10 files changed, 25 insertions(+), 20 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index c925d67b0cc..032641f2609 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -136,7 +136,8 @@ public static void inspectBigQueryTable( Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); subscriber.startAsync(); - // Wait for the original job to complete + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java index e4a63956637..a5336cdaea1 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -131,7 +131,8 @@ public static void inspectBigQueryTableWithSampling( Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); subscriber.startAsync(); - // Wait for the original job to complete + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index 3b1d7f048da..c601747db44 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -137,7 +137,8 @@ public static void insepctDatastoreEntity( Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); subscriber.startAsync(); - // Wait for the original job to complete + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 1a1c00c77be..102affcaf98 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -126,7 +126,8 @@ public static void inspectGcsFile( Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); subscriber.startAsync(); - // Wait for the original job to complete + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java index e868b4998bd..1c08e508419 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -129,7 +129,8 @@ public static void inspectGcsFileWithSampling( Subscriber subscriber = Subscriber.newBuilder(subscriptionName, messageHandler).build(); subscriber.startAsync(); - // Wait for the original job to complete + // Wait for job completion semi-synchronously + // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index 0e51c691550..2383d777adc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -122,10 +122,10 @@ public static void categoricalStatsAnalysis( // Wait for job completion semi-synchronously // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); + System.out.println("Job was not completed after 15 minutes."); + return; } finally { subscriber.stopAsync(); subscriber.awaitTerminated(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index ec6e1bb1226..252c87c2ad4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -130,10 +130,10 @@ public static void calculateKAnonymity( // Wait for job completion semi-synchronously // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); + System.out.println("Job was not completed after 15 minutes."); + return; } finally { subscriber.stopAsync(); subscriber.awaitTerminated(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index 807c6f04e4f..a698b0be5e3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -155,10 +155,10 @@ public static void calculateKMap( // Wait for job completion semi-synchronously // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); + System.out.println("Job was not completed after 15 minutes."); + return; } finally { subscriber.stopAsync(); subscriber.awaitTerminated(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index f9d0551853b..005e54d2152 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -138,10 +138,10 @@ public static void calculateLDiversity( // Wait for job completion semi-synchronously // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); + System.out.println("Job was not completed after 15 minutes."); + return; } finally { subscriber.stopAsync(); subscriber.awaitTerminated(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index f677c62772f..dde9467f90d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -122,10 +122,10 @@ public static void numericalStatsAnalysis( // Wait for job completion semi-synchronously // For long jobs, consider using a truly asynchronous execution model such as Cloud Functions try { - done.get(1, TimeUnit.MINUTES); - Thread.sleep(500); // Wait for the job to become available + done.get(15, TimeUnit.MINUTES); } catch (TimeoutException e) { - System.out.println("Unable to verify job completion."); + System.out.println("Job was not completed after 15 minutes."); + return; } finally { subscriber.stopAsync(); subscriber.awaitTerminated(); From 531e28be769e85c79671921ff2337d8ad5356219 Mon Sep 17 00:00:00 2001 From: Chris Wilson <46912004+sushicw@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:48:04 -0700 Subject: [PATCH 095/406] samples: Clean up DLP tests (#3198) Should help with #3191 and other test failures. * Switch to using the Truth assertion library * Cleaned up some poorly formed test assertions that gave no useful error output * Refactor common test code into a base class - [x] I have followed [Sample Format Guide](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/SAMPLE_FORMAT.md) - [x] `pom.xml` parent set to latest `shared-configuration` - [x] Appropriate changes to README are included in PR - [x] API's need to be enabled to test (tell us) (**Nothing New**) - [x] Environment Variables need to be set (ask us to set them) (**Nothing New**) - [x] **Tests** pass: `mvn clean verify` **required** - [x] **Lint** passes: `mvn -P lint checkstyle:check` **required** - [x] **Static Analysis**: `mvn -P lint clean compile pmd:cpd-check spotbugs:check` **advisory only** - [x] Please **merge** this PR for me once it is approved. --- .../dlp/snippets/DeIdentificationTests.java | 105 +++++--------- .../java/dlp/snippets/InfoTypesTests.java | 41 ++---- .../test/java/dlp/snippets/InspectTests.java | 135 +++++++----------- .../src/test/java/dlp/snippets/JobsTests.java | 51 ++----- .../java/dlp/snippets/QuickstartTests.java | 42 +----- .../test/java/dlp/snippets/RedactTests.java | 50 ++----- .../java/dlp/snippets/RiskAnalysisTests.java | 76 +++------- .../java/dlp/snippets/TemplatesTests.java | 49 ++----- .../src/test/java/dlp/snippets/TestBase.java | 67 +++++++++ .../test/java/dlp/snippets/TriggersTests.java | 51 ++----- 10 files changed, 233 insertions(+), 434 deletions(-) create mode 100644 dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index 3c999d80654..c326559e98a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -16,61 +16,30 @@ package dlp.snippets; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; +import com.google.common.collect.ImmutableList; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.Table; import com.google.privacy.dlp.v2.Table.Row; import com.google.privacy.dlp.v2.Value; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.PrintStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import org.junit.After; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class DeIdentificationTests { - - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - // TODO: Update as ENV_VARs - private static final String bucketName = PROJECT_ID + "/dlp"; - private ByteArrayOutputStream bout; - private String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); - private String kmsKeyName = System.getenv("DLP_DEID_KEY_NAME"); - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - @Before - public void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("DLP_DEID_WRAPPED_KEY"); - requireEnvVar("DLP_DEID_KEY_NAME"); - } - - @Before - public void captureOut() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } +public class DeIdentificationTests extends TestBase { - @After - public void releaseOut() { - System.setOut(null); - bout.reset(); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList + .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "DLP_DEID_WRAPPED_KEY", + "DLP_DEID_KEY_NAME"); } @Test @@ -78,7 +47,7 @@ public void testDeIdentifyWithMasking() throws IOException { DeIdentifyWithMasking.deIdentifyWithMasking(PROJECT_ID, "My SSN is 372819127"); String output = bout.toString(); - assertThat(output, containsString("Text after masking:")); + assertThat(output).contains("Text after masking:"); } @Test @@ -86,7 +55,7 @@ public void testDeIdentifyWithFpe() throws IOException { DeIdentifyWithFpe.deIdentifyWithFpe(PROJECT_ID, "My SSN is 372819127", kmsKeyName, wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Text after format-preserving encryption:")); + assertThat(output).contains("Text after format-preserving encryption:"); } @Test @@ -95,7 +64,7 @@ public void testReIdentifyWithFpe() throws IOException { PROJECT_ID, "My SSN is SSN_TOKEN(9):731997681", kmsKeyName, wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Text after re-identification:")); + assertThat(output).contains("Text after re-identification:"); } @Test @@ -104,7 +73,7 @@ public void testDeIdentifyTextWithFpe() throws IOException { PROJECT_ID, "My phone number is 4359916732", kmsKeyName, wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Text after format-preserving encryption: ")); + assertThat(output).contains("Text after format-preserving encryption: "); } @Test @@ -116,7 +85,7 @@ public void testReIdentifyTextWithFpe() throws IOException { wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Text after re-identification: ")); + assertThat(output).contains("Text after re-identification: "); } @Test @@ -146,7 +115,7 @@ public void testDeIdentifyTableWithFpe() throws IOException { PROJECT_ID, tableToDeIdentify, kmsKeyName, wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Table after format-preserving encryption:")); + assertThat(output).contains("Table after format-preserving encryption:"); } @Test @@ -161,7 +130,7 @@ public void testReIdentifyTableWithFpe() throws IOException { PROJECT_ID, tableToReIdentify, kmsKeyName, wrappedKey); String output = bout.toString(); - assertThat(output, containsString("Table after re-identification:")); + assertThat(output).contains("Table after re-identification:"); } @Test @@ -211,8 +180,8 @@ public void testDeIdentifyTableBucketing() throws IOException { Table table = DeIdentifyTableBucketing.deIdentifyTableBucketing(PROJECT_ID, tableToDeIdentify); String output = bout.toString(); - assertThat(output, containsString("Table after de-identification:")); - assertEquals(expectedTable, table); + assertThat(output).contains("Table after de-identification:"); + assertThat(table).isEqualTo(expectedTable); } @Test @@ -263,8 +232,8 @@ public void testDeIdentifyTableConditionMasking() throws IOException { PROJECT_ID, tableToDeIdentify); String output = bout.toString(); - assertThat(output, containsString("Table after de-identification:")); - assertEquals(expectedTable, table); + assertThat(output).contains("Table after de-identification:"); + assertThat(table).isEqualTo(expectedTable); } @Test @@ -326,8 +295,8 @@ public void testDeIdentifyTableInfoTypes() throws IOException { Table table = DeIdentifyTableInfoTypes.deIdentifyTableInfoTypes(PROJECT_ID, tableToDeIdentify); String output = bout.toString(); - assertThat(output, containsString("Table after de-identification:")); - assertEquals(expectedTable, table); + assertThat(output).contains("Table after de-identification:"); + assertThat(table).isEqualTo(expectedTable); } @Test @@ -373,8 +342,8 @@ public void testDeIdentifyTableRowSuppress() throws IOException { PROJECT_ID, tableToDeIdentify); String output = bout.toString(); - assertThat(output, containsString("Table after de-identification:")); - assertEquals(expectedTable, table); + assertThat(output).contains("Table after de-identification:"); + assertThat(table).isEqualTo(expectedTable); } @Test @@ -437,20 +406,20 @@ public void testDeIdentifyTableConditionsInfoTypes() throws IOException { PROJECT_ID, tableToDeIdentify); String output = bout.toString(); - assertThat(output, containsString("Table after de-identification:")); - assertEquals(expectedTable, table); + assertThat(output).contains("Table after de-identification:"); + assertThat(table).isEqualTo(expectedTable); } @Test public void testDeIdentifyWithDateShift() throws IOException { Path inputFile = Paths.get("src/test/resources/dates.csv"); - assertThat("Input file must exist", inputFile.toFile().exists()); + assertWithMessage("Input file must exist").that(inputFile.toFile().exists()).isTrue(); Path outputFile = Paths.get("src/test/resources/results.csv"); - assertThat("Output file must be writeable", inputFile.toFile().canWrite()); + assertWithMessage("Output file must be writeable").that(inputFile.toFile().canWrite()).isTrue(); DeIdentifyWithDateShift.deIdentifyWithDateShift(PROJECT_ID, inputFile, outputFile); String output = bout.toString(); - assertThat(output, containsString("Content written to file: ")); + assertThat(output).contains("Content written to file: "); // Clean up test output Files.delete(outputFile); @@ -463,8 +432,8 @@ public void testDeIdentifyWithRedaction() throws IOException { "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); String output = bout.toString(); - assertThat(output, containsString("Text after redaction: " - + "My name is Alicia Abernathy, and my email address is .")); + assertThat(output).contains("Text after redaction: " + + "My name is Alicia Abernathy, and my email address is ."); } @Test @@ -474,8 +443,8 @@ public void testDeIdentifyWithReplacement() throws IOException { "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); String output = bout.toString(); - assertThat(output, containsString("Text after redaction: " - + "My name is Alicia Abernathy, and my email address is [email-address].")); + assertThat(output).contains("Text after redaction: " + + "My name is Alicia Abernathy, and my email address is [email-address]."); } @Test @@ -485,8 +454,8 @@ public void testDeIdentifyWithInfoType() throws IOException { "My email is test@example.com"); String output = bout.toString(); - assertThat(output, containsString("Text after redaction: " - + "My email is [EMAIL_ADDRESS]")); + assertThat(output).contains("Text after redaction: " + + "My email is [EMAIL_ADDRESS]"); } @Test @@ -495,7 +464,7 @@ public void testDeIdentifyWithSimpleWordList() throws IOException { PROJECT_ID, "Patient was seen in RM-YELLOW then transferred to rm green."); String output = bout.toString(); - assertThat(output, containsString("Text after replace with infotype config: ")); + assertThat(output).contains("Text after replace with infotype config: "); } @Test @@ -504,6 +473,6 @@ public void testDeIdentifyWithExceptionList() throws IOException { PROJECT_ID, "jack@example.org accessed customer record of user5@example.com"); String output = bout.toString(); - assertThat(output, containsString("Text after replace with infotype config: ")); + assertThat(output).contains("Text after replace with infotype config: "); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java index c056bfcc990..39792218457 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java @@ -16,51 +16,26 @@ package dlp.snippets; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static com.google.common.truth.Truth.assertThat; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; +import com.google.common.collect.ImmutableList; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class InfoTypesTests { +public class InfoTypesTests extends TestBase { - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - @Before - public void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS"); } @Test public void testListInfoTypes() throws Exception { InfoTypesList.listInfoTypes(); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Name")); - assertThat(output, CoreMatchers.containsString("Display name")); + assertThat(output).contains("Name"); + assertThat(output).contains("Display name"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index d888316596a..340bb8514be 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -16,14 +16,12 @@ package dlp.snippets; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.ApiException; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.common.collect.ImmutableList; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.Table; import com.google.privacy.dlp.v2.Table.Row; @@ -31,32 +29,22 @@ import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.TopicName; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.util.Arrays; import java.util.UUID; import org.junit.After; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class InspectTests { - - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String GCS_PATH = System.getenv("GCS_PATH"); - private static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); - private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); - private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); - private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); +public class InspectTests extends TestBase { + // TODO: Update as ENV_VARs private static final String datastoreNamespace = ""; private static final String datastoreKind = "dlp"; private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; - private ByteArrayOutputStream bout; private UUID testRunUuid = UUID.randomUUID(); private TopicName topicName = TopicName.of( PROJECT_ID, @@ -64,27 +52,16 @@ public class InspectTests { private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( PROJECT_ID, String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); - private PrintStream originalOut = System.out; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("GCS_PATH"); - requireEnvVar("PUB_SUB_TOPIC"); - requireEnvVar("PUB_SUB_SUBSCRIPTION"); - requireEnvVar("BIGQUERY_DATASET"); - requireEnvVar("BIGQUERY_TABLE"); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList + .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GCS_PATH", "PUB_SUB_TOPIC", + "PUB_SUB_SUBSCRIPTION", "BIGQUERY_DATASET", "BIGQUERY_TABLE"); } @Before - public void setUp() throws Exception { + public void before() throws Exception { // Create a new topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.createTopic(topicName); @@ -95,19 +72,11 @@ public void setUp() throws Exception { subscriptionAdminClient .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); } - - // Capture stdout - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); } @After - public void tearDown() throws Exception { - // Restore stdout - System.setOut(originalOut); - bout.reset(); - + public void after() throws Exception { // Delete the test topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName); @@ -132,7 +101,7 @@ public void testInspectPhoneNumber() throws Exception { InspectString.inspectString(PROJECT_ID, "My phone number is (415) 555-0890"); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output).contains("Info type: PHONE_NUMBER"); } @Test @@ -140,7 +109,7 @@ public void testInspectString() throws Exception { InspectString.inspectString(PROJECT_ID, "I'm Gary and my email is gary@example.com"); String output = bout.toString(); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output).contains("Info type: EMAIL_ADDRESS"); } @Test @@ -149,7 +118,7 @@ public void testInspectWithCustomRegex() throws Exception { PROJECT_ID, "Patients MRN 444-5-22222", "[1-9]{3}-[1-9]{1}-[1-9]{5}"); String output = bout.toString(); - assertThat(output, containsString("Info type: C_MRN")); + assertThat(output).contains("Info type: C_MRN"); } @Test @@ -159,8 +128,8 @@ public void testInspectStringWithExclusionDict() throws Exception { Arrays.asList("example@example.com")); String output = bout.toString(); - assertThat(output, containsString("gary@example.com")); - assertThat(output, not(containsString("example@example.com"))); + assertThat(output).contains("gary@example.com"); + assertThat(output).doesNotContain("example@example.com"); } @Test @@ -170,8 +139,8 @@ public void testInspectStringWithExclusionDictSubstring() throws Exception { Arrays.asList("TEST")); String output = bout.toString(); - assertThat(output, containsString("gary@example.com")); - assertThat(output, not(containsString("TEST@example.com"))); + assertThat(output).contains("gary@example.com"); + assertThat(output).doesNotContain("TEST@example.com"); } @Test @@ -181,8 +150,8 @@ public void testInspectStringWithExclusionRegex() throws Exception { ".+@example.com"); String output = bout.toString(); - assertThat(output, containsString("bob@example.org")); - assertThat(output, not(containsString("gary@example.com"))); + assertThat(output).contains("bob@example.org"); + assertThat(output).doesNotContain("gary@example.com"); } @Test @@ -193,8 +162,8 @@ public void testInspectStringCustomExcludingSubstring() throws Exception { Arrays.asList("Jimmy")); String output = bout.toString(); - assertThat(output, containsString("Doe, John")); - assertThat(output, not(containsString("Example, Jimmy"))); + assertThat(output).contains("Doe, John"); + assertThat(output).doesNotContain("Example, Jimmy"); } @Test @@ -203,8 +172,8 @@ public void testInspectStringCustomOmitOverlap() throws Exception { "Name: Jane Doe. Name: Larry Page."); String output = bout.toString(); - assertThat(output, containsString("Jane Doe")); - assertThat(output, not(containsString("Larry Page"))); + assertThat(output).contains("Jane Doe"); + assertThat(output).doesNotContain("Larry Page"); } @Test @@ -212,8 +181,8 @@ public void testInspectStringOmitOverlap() throws Exception { InspectStringOmitOverlap.inspectStringOmitOverlap(PROJECT_ID, "james@example.com"); String output = bout.toString(); - assertThat(output, containsString("EMAIL_ADDRESS")); - assertThat(output, not(containsString("PERSON_NAME"))); + assertThat(output).contains("EMAIL_ADDRESS"); + assertThat(output).doesNotContain("PERSON_NAME"); } @Test @@ -222,8 +191,8 @@ public void testInspectStringWithoutOverlap() throws Exception { "example.com is a domain, james@example.org is an email."); String output = bout.toString(); - assertThat(output, containsString("example.com")); - assertThat(output, not(containsString("example.org"))); + assertThat(output).contains("example.com"); + assertThat(output).doesNotContain("example.org"); } @Test @@ -238,7 +207,7 @@ public void testInspectTable() { InspectTable.inspectTable(PROJECT_ID, tableToInspect); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); + assertThat(output).contains("Info type: PHONE_NUMBER"); } @Test @@ -247,7 +216,7 @@ public void testInspectStringCustomHotword() throws Exception { "patient name: John Doe", "patient"); String output = bout.toString(); - assertThat(output, containsString("John Doe")); + assertThat(output).contains("John Doe"); } @Test @@ -256,7 +225,7 @@ public void testInspectStringCustomHotwordNegativeExample() throws Exception { "name: John Doe", "patient"); String output = bout.toString(); - assertThat(output, not(containsString("John Doe"))); + assertThat(output).doesNotContain("John Doe"); } @Test @@ -265,7 +234,7 @@ public void testInspectStringMultipleRulesPatientRule() throws Exception { "patient: Jane Doe"); String output = bout.toString(); - assertThat(output, containsString("VERY_LIKELY")); + assertThat(output).contains("VERY_LIKELY"); } @Test @@ -274,7 +243,7 @@ public void testInspectStringMultipleRulesDoctorRule() throws Exception { "doctor: Jane Doe"); String output = bout.toString(); - assertThat(output, containsString("Findings: 0")); + assertThat(output).contains("Findings: 0"); } @Test @@ -283,7 +252,7 @@ public void testInspectStringMultipleRulesQuasimodoRule() throws Exception { "patient: Quasimodo"); String output = bout.toString(); - assertThat(output, containsString("Findings: 0")); + assertThat(output).contains("Findings: 0"); } @Test @@ -292,15 +261,15 @@ public void testInspectStringMultipleRulesRedactedRule() throws Exception { "name of patient: REDACTED"); String output = bout.toString(); - assertThat(output, containsString("Findings: 0")); + assertThat(output).contains("Findings: 0"); } @Test public void textInspectTestFile() throws Exception { InspectTextFile.inspectTextFile(PROJECT_ID, "src/test/resources/test.txt"); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output).contains("Info type: PHONE_NUMBER"); + assertThat(output).contains("Info type: EMAIL_ADDRESS"); } @Test @@ -308,8 +277,8 @@ public void testInspectImageFile() throws Exception { InspectImageFile.inspectImageFile(PROJECT_ID, "src/test/resources/test.png"); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); + assertThat(output).contains("Info type: PHONE_NUMBER"); + assertThat(output).contains("Info type: EMAIL_ADDRESS"); } @Test @@ -317,9 +286,9 @@ public void testRedactImageAllInfoTypes() throws Exception { InspectImageFileAllInfoTypes.inspectImageFileAllInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); - assertThat(output, containsString("Info type: DATE")); + assertThat(output).contains("Info type: PHONE_NUMBER"); + assertThat(output).contains("Info type: EMAIL_ADDRESS"); + assertThat(output).contains("Info type: DATE"); } @Test @@ -328,9 +297,9 @@ public void testRedactImageListedInfoTypes() throws Exception { PROJECT_ID, DOCUMENT_INPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Info type: PHONE_NUMBER")); - assertThat(output, containsString("Info type: EMAIL_ADDRESS")); - assertThat(output, not(containsString("Info type: DATE"))); + assertThat(output).contains("Info type: PHONE_NUMBER"); + assertThat(output).contains("Info type: EMAIL_ADDRESS"); + assertThat(output).doesNotContain("Info type: DATE"); } @Test @@ -340,7 +309,7 @@ public void testInspectGcsFile() throws Exception { subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Job status: DONE")); + assertThat(output).contains("Job status: DONE"); } @Test @@ -350,7 +319,7 @@ public void testInspectGcsFileWithSampling() throws Exception { subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Job status: DONE")); + assertThat(output).contains("Job status: DONE"); } @Test @@ -360,7 +329,7 @@ public void testInspectDatastoreEntity() throws Exception { subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Job status: DONE")); + assertThat(output).contains("Job status: DONE"); } @Test @@ -370,7 +339,7 @@ public void testInspectBigQueryTable() throws Exception { subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Job status: DONE")); + assertThat(output).contains("Job status: DONE"); } @Test @@ -380,7 +349,7 @@ public void testInspectBigQueryTableWithSampling() throws Exception { subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Job status: DONE")); + assertThat(output).contains("Job status: DONE"); } @Test @@ -392,7 +361,7 @@ public void testInspectWithHotwordRules() throws Exception { "(?i)(mrn|medical)(?-i)"); String output = bout.toString(); - assertThat(output, containsString("Findings: 2")); - assertThat(output, containsString("Info type: C_MRN")); + assertThat(output).contains("Findings: 2"); + assertThat(output).contains("Info type: C_MRN"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java index 4df20a3d0ff..7a0a13551fb 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java @@ -16,10 +16,10 @@ package dlp.snippets; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static com.google.common.truth.Truth.assertThat; import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.collect.ImmutableList; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CloudStorageOptions.FileSet; import com.google.privacy.dlp.v2.CreateDlpJobRequest; @@ -29,30 +29,18 @@ import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.StorageConfig; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.PrintStream; import java.util.UUID; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class JobsTests { +public class JobsTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String GCS_PATH = System.getenv("GCS_PATH"); - - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GCS_PATH"); } private static DlpJob createJob(String jobId) throws IOException { @@ -80,31 +68,12 @@ private static DlpJob createJob(String jobId) throws IOException { } } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("GCS_PATH"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - @Test public void testCreateJobs() throws Exception { // Call createJobs to create a Dlp job from project id and gcs path. JobsCreate.createJobs(PROJECT_ID, GCS_PATH); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Job created successfully:")); + assertThat(output).contains("Job created successfully:"); // Delete the created Dlp Job String dlpJobName = output.split("Job created successfully: ")[1].split("\n")[0]; @@ -124,7 +93,7 @@ public void testGetJobs() throws Exception { // Get the job with the specified ID JobsGet.getJobs(PROJECT_ID, "i-" + jobId); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Job got successfully.")); + assertThat(output).contains("Job got successfully."); // Delete the created Dlp Job String dlpJobName = createdDlpJob.getName(); @@ -142,7 +111,7 @@ public void testListJobs() throws Exception { String output = bout.toString(); // Check that the output contains a list of jobs, or is empty - assertThat(output, CoreMatchers.containsString("DLP jobs found:")); + assertThat(output).contains("DLP jobs found:"); } @Test @@ -154,6 +123,6 @@ public void testDeleteJobs() throws Exception { // Delete the job with the specified ID JobsDelete.deleteJobs(PROJECT_ID, "i-" + jobId); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Job deleted successfully.")); + assertThat(output).contains("Job deleted successfully."); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java index b3cac2738a5..eb333a4ac3a 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java @@ -16,48 +16,20 @@ package dlp.snippets; -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.core.StringContains.containsString; -import static org.junit.Assert.assertThat; +import static com.google.common.truth.Truth.assertThat; -import java.io.ByteArrayOutputStream; +import com.google.common.collect.ImmutableList; import java.io.IOException; -import java.io.PrintStream; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class QuickstartTests { +public class QuickstartTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void beforeTest() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT"); } @Test @@ -65,6 +37,6 @@ public void testQuickstart() throws IOException { QuickStart.quickstart(PROJECT_ID); String output = bout.toString(); - assertThat(output, containsString("Inspect of text complete")); + assertThat(output).contains("Inspect of text complete"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index af2b453fd64..73015928cd7 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -16,60 +16,34 @@ package dlp.snippets; -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.StringContains.containsString; +import static com.google.common.truth.Truth.assertThat; -import java.io.ByteArrayOutputStream; +import com.google.common.collect.ImmutableList; import java.io.IOException; -import java.io.PrintStream; import java.nio.file.Files; import java.nio.file.Paths; import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class RedactTests { +public class RedactTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String SIMPLE_INPUT_FILE = "src/test/resources/test.png"; private static final String SIMPLE_OUTPUT_FILE = "redacted.png"; private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; private static final String DOCUMENT_OUTPUT_FILE = "sensitive-data-image-redacted.jpg"; - private ByteArrayOutputStream bout; - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void beforeTest() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT"); } @After - public void cleanUp() throws IOException { + public void after() throws IOException { Files.deleteIfExists(Paths.get(SIMPLE_OUTPUT_FILE)); Files.deleteIfExists(Paths.get(DOCUMENT_OUTPUT_FILE)); } @@ -79,7 +53,7 @@ public void testRedactImage() throws Exception { RedactImageFile.redactImageFile(PROJECT_ID, SIMPLE_INPUT_FILE, SIMPLE_OUTPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Redacted image written")); + assertThat(output).contains("Redacted image written"); } @Test @@ -88,7 +62,7 @@ public void testRedactImageAllInfoTypes() throws Exception { DOCUMENT_OUTPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Redacted image written")); + assertThat(output).contains("Redacted image written"); } @Test @@ -97,7 +71,7 @@ public void testRedactImageListedInfoTypes() throws Exception { DOCUMENT_OUTPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Redacted image written")); + assertThat(output).contains("Redacted image written"); } @Test @@ -106,7 +80,7 @@ public void testRedactImageColoredInfoTypes() throws Exception { DOCUMENT_OUTPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Redacted image written")); + assertThat(output).contains("Redacted image written"); } @Test @@ -115,6 +89,6 @@ public void testRedactImageAllText() throws Exception { DOCUMENT_OUTPUT_FILE); String output = bout.toString(); - assertThat(output, containsString("Redacted image written")); + assertThat(output).contains("Redacted image written"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index e03002c494c..de2091998f1 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -16,38 +16,25 @@ package dlp.snippets; -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.ApiException; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.common.collect.ImmutableList; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.TopicName; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.util.UUID; -import java.util.regex.Pattern; import org.junit.After; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class RiskAnalysisTests { +public class RiskAnalysisTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); - private static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); - private static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); - private static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); - - private ByteArrayOutputStream bout; private UUID testRunUuid = UUID.randomUUID(); private TopicName topicName = TopicName.of( PROJECT_ID, @@ -55,26 +42,16 @@ public class RiskAnalysisTests { private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( PROJECT_ID, String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); - private PrintStream originalOut = System.out; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); - } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("PUB_SUB_TOPIC"); - requireEnvVar("PUB_SUB_SUBSCRIPTION"); - requireEnvVar("BIGQUERY_DATASET"); - requireEnvVar("BIGQUERY_TABLE"); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList + .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "PUB_SUB_TOPIC", + "PUB_SUB_SUBSCRIPTION", "BIGQUERY_DATASET", "BIGQUERY_TABLE"); } @Before - public void setUp() throws Exception { + public void before() throws Exception { // Create a new topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.createTopic(topicName); @@ -84,19 +61,10 @@ public void setUp() throws Exception { subscriptionAdminClient .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); } - - // Capture stdout - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); } - @After - public void tearDown() throws Exception { - // Restore stdout - System.setOut(originalOut); - bout.reset(); - + public void after() throws Exception { // Delete the test topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName); @@ -121,7 +89,7 @@ public void testNumericalStats() throws Exception { RiskAnalysisNumericalStats.numericalStatsAnalysis( PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); - assertThat(output, containsString("Value at ")); + assertThat(output).contains("Value at "); } @Test @@ -131,8 +99,8 @@ public void testCategoricalStats() throws Exception { String output = bout.toString(); - assertTrue(Pattern.compile("Most common value occurs \\d time").matcher(output).find()); - assertTrue(Pattern.compile("Least common value occurs \\d time").matcher(output).find()); + assertThat(output).containsMatch("Most common value occurs \\d time"); + assertThat(output).containsMatch("Least common value occurs \\d time"); } @Test @@ -140,9 +108,9 @@ public void testKAnonymity() throws Exception { RiskAnalysisKAnonymity.calculateKAnonymity( PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); - assertTrue(Pattern.compile("Bucket size range: \\[\\d, \\d\\]").matcher(output).find()); - assertTrue(output.contains("Quasi-ID values: integer_value: 19")); - assertTrue(output.contains("Class size: 1")); + assertThat(output).containsMatch("Bucket size range: \\[\\d, \\d\\]"); + assertThat(output).contains("Quasi-ID values: integer_value: 19"); + assertThat(output).contains("Class size: 1"); } @Test @@ -150,9 +118,9 @@ public void testLDiversity() throws Exception { RiskAnalysisLDiversity.calculateLDiversity( PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); - assertTrue(output.contains("Quasi-ID values: integer_value: 19")); - assertTrue(output.contains("Class size: 1")); - assertTrue(output.contains("Sensitive value string_value: \"James\"")); + assertThat(output).contains("Quasi-ID values: integer_value: 19"); + assertThat(output).contains("Class size: 1"); + assertThat(output).contains("Sensitive value string_value: \"James\""); } @Test @@ -162,8 +130,8 @@ public void testKMap() throws Exception { String output = bout.toString(); - assertTrue(Pattern.compile("Anonymity range: \\[\\d, \\d]").matcher(output).find()); - assertTrue(Pattern.compile("Size: \\d").matcher(output).find()); - assertTrue(Pattern.compile("Values: \\{\\d{2}, \"Female\"\\}").matcher(output).find()); + assertThat(output).containsMatch("Anonymity range: \\[\\d, \\d]"); + assertThat(output).containsMatch("Size: \\d"); + assertThat(output).containsMatch("Values: \\{\\d{2}, \"Female\"\\}"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java index 7a923b862c3..1af435a56c4 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java @@ -16,43 +16,32 @@ package dlp.snippets; -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static com.google.common.truth.Truth.assertThat; import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.collect.ImmutableList; import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; import com.google.privacy.dlp.v2.InfoType; import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectTemplate; import com.google.privacy.dlp.v2.LocationName; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.PrintStream; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class TemplatesTests { +public class TemplatesTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT"); } private static InspectTemplate createTemplate() throws IOException { @@ -77,31 +66,11 @@ private static InspectTemplate createTemplate() throws IOException { } } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - @Test public void testCreateInspectTemplate() throws Exception { TemplatesCreate.createInspectTemplate(PROJECT_ID); String output = bout.toString(); - assertThat(output, containsString("Template created: ")); - + assertThat(output).contains("Template created: "); // Delete the created template String templateId = output.split("Template created: ")[1].split("\n")[0]; @@ -116,7 +85,7 @@ public void testCreateInspectTemplate() throws Exception { public void testListInspectTemplate() throws Exception { TemplatesList.listInspectTemplates(PROJECT_ID); String output = bout.toString(); - assertThat(output, containsString("Templates found:")); + assertThat(output).contains("Templates found:"); } @Test @@ -136,6 +105,6 @@ public void testDeleteInspectTemplate() throws Exception { // Delete the template with the specified ID TemplatesDelete.deleteInspectTemplate(PROJECT_ID, templateId); String output = bout.toString(); - assertThat(output, containsString("Deleted template:")); + assertThat(output).contains("Deleted template:"); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java new file mode 100644 index 00000000000..40007d31e51 --- /dev/null +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java @@ -0,0 +1,67 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dlp.snippets; + +import static com.google.common.truth.Truth.assertWithMessage; + +import com.google.common.collect.ImmutableList; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.After; +import org.junit.Before; + +/** + * Common base class for DLP snippet tests + */ +abstract class TestBase { + + protected static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + protected static final String GCS_PATH = System.getenv("GCS_PATH"); + protected static final String TOPIC_ID = System.getenv("PUB_SUB_TOPIC"); + protected static final String SUBSCRIPTION_ID = System.getenv("PUB_SUB_SUBSCRIPTION"); + protected static final String DATASET_ID = System.getenv("BIGQUERY_DATASET"); + protected static final String TABLE_ID = System.getenv("BIGQUERY_TABLE"); + protected static final String wrappedKey = System.getenv("DLP_DEID_WRAPPED_KEY"); + protected static final String kmsKeyName = System.getenv("DLP_DEID_KEY_NAME"); + + protected ByteArrayOutputStream bout; + private PrintStream originalOut = System.out; + + protected abstract ImmutableList requiredEnvVars(); + + private static void requireEnvVar(String varName) { + assertWithMessage( + String.format("Environment variable '%s' must be set to perform these tests.", varName)) + .that(System.getenv(varName)).isNotEmpty(); + } + + @Before + public void beforeBase() { + requiredEnvVars().stream().forEach(TestBase::requireEnvVar); + + // Capture stdout + bout = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bout)); + } + + @After + public void afterBase() { + // Restore stdout + System.setOut(originalOut); + bout.reset(); + } +} diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java index cf7f32f2ef2..b84710fb345 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java @@ -16,10 +16,10 @@ package dlp.snippets; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static com.google.common.truth.Truth.assertThat; import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.common.collect.ImmutableList; import com.google.privacy.dlp.v2.CloudStorageOptions; import com.google.privacy.dlp.v2.CreateJobTriggerRequest; import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; @@ -30,31 +30,19 @@ import com.google.privacy.dlp.v2.Schedule; import com.google.privacy.dlp.v2.StorageConfig; import com.google.protobuf.Duration; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.PrintStream; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class TriggersTests { +public class TriggersTests extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String GCS_PATH = System.getenv("GCS_PATH"); - - private ByteArrayOutputStream bout; - - private static void requireEnvVar(String varName) { - assertNotNull( - String.format("Environment variable '%s' must be set to perform these tests.", varName), - System.getenv(varName)); + @Override + protected ImmutableList requiredEnvVars() { + return ImmutableList.of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GCS_PATH"); } private static JobTrigger createTrigger() throws IOException { @@ -92,32 +80,11 @@ private static JobTrigger createTrigger() throws IOException { } } - @BeforeClass - public static void checkRequirements() { - requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnvVar("GOOGLE_CLOUD_PROJECT"); - requireEnvVar("GCS_PATH"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - - @After - public void tearDown() { - System.setOut(null); - bout.reset(); - } - - @Test public void testCreateTrigger() throws Exception { TriggersCreate.createTrigger(PROJECT_ID, GCS_PATH); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Created Trigger:")); + assertThat(output).contains("Created Trigger:"); // Delete the created trigger String triggerId = output.split("Created Trigger: ")[1].split("\n")[0]; @@ -132,7 +99,7 @@ public void testCreateTrigger() throws Exception { public void testListTrigger() throws Exception { TriggersList.listTriggers(PROJECT_ID); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("DLP triggers found:")); + assertThat(output).contains("DLP triggers found:"); } @Test @@ -151,6 +118,6 @@ public void testDeleteTrigger() throws Exception { // Delete the job with the specified ID TriggersDelete.deleteTrigger(PROJECT_ID, triggerId); String output = bout.toString(); - assertThat(output, CoreMatchers.containsString("Trigger deleted:")); + assertThat(output).contains("Trigger deleted:"); } } From 19a5bced81a22efc50802ad685e2ffd48fcb8ac1 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 3 Aug 2020 10:44:49 -0700 Subject: [PATCH 096/406] samples: fix dependencies --- dlp/snippets/install-without-bom/pom.xml | 5 +++++ .../src/test/resources/dates.csv | 5 +++++ .../src/test/resources/results.correct.csv | 5 +++++ .../src/test/resources/sensitive-data-image.jpg | Bin 0 -> 78548 bytes .../src/test/resources/test.png | Bin 0 -> 5109 bytes .../src/test/resources/test.txt | 1 + dlp/snippets/snapshot/pom.xml | 9 +++++++-- .../snapshot/src/test/resources/dates.csv | 5 +++++ .../src/test/resources/results.correct.csv | 5 +++++ .../src/test/resources/sensitive-data-image.jpg | Bin 0 -> 78548 bytes .../snapshot/src/test/resources/test.png | Bin 0 -> 5109 bytes .../snapshot/src/test/resources/test.txt | 1 + dlp/snippets/snippets/pom.xml | 9 +++++++-- 13 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 dlp/snippets/install-without-bom/src/test/resources/dates.csv create mode 100644 dlp/snippets/install-without-bom/src/test/resources/results.correct.csv create mode 100644 dlp/snippets/install-without-bom/src/test/resources/sensitive-data-image.jpg create mode 100644 dlp/snippets/install-without-bom/src/test/resources/test.png create mode 100644 dlp/snippets/install-without-bom/src/test/resources/test.txt create mode 100644 dlp/snippets/snapshot/src/test/resources/dates.csv create mode 100644 dlp/snippets/snapshot/src/test/resources/results.correct.csv create mode 100644 dlp/snippets/snapshot/src/test/resources/sensitive-data-image.jpg create mode 100644 dlp/snippets/snapshot/src/test/resources/test.png create mode 100644 dlp/snippets/snapshot/src/test/resources/test.txt diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 08bffe1e561..75821f942b7 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -33,6 +33,11 @@ + + com.google.cloud + google-cloud-pubsub + 1.108.0 + junit junit diff --git a/dlp/snippets/install-without-bom/src/test/resources/dates.csv b/dlp/snippets/install-without-bom/src/test/resources/dates.csv new file mode 100644 index 00000000000..290a85dec68 --- /dev/null +++ b/dlp/snippets/install-without-bom/src/test/resources/dates.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,01/01/1970,4532908762519852,07/21/1996 +James,03/06/1988,4301261899725540,04/09/2001 +Dan,08/14/1945,4620761856015295,11/15/2011 +Laura,11/03/1992,4564981067258901,01/04/2017 diff --git a/dlp/snippets/install-without-bom/src/test/resources/results.correct.csv b/dlp/snippets/install-without-bom/src/test/resources/results.correct.csv new file mode 100644 index 00000000000..5b078fe825a --- /dev/null +++ b/dlp/snippets/install-without-bom/src/test/resources/results.correct.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,1970-01-06,4532908762519852,1996-07-26 +James,1988-03-11,4301261899725540,2001-04-14 +Dan,1945-08-19,4620761856015295,2011-11-20 +Laura,1992-11-08,4564981067258901,2017-01-09 diff --git a/dlp/snippets/install-without-bom/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/install-without-bom/src/test/resources/sensitive-data-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6e2d84546e4c623df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H5XG2Y? z6lUqO2rv{E91m4$B<9Ad)ax6#04uTODt&Im{P+C4D~&~Kjzj)#52G0}v_5@yv#gMu z`MG!RFdSltmJf_-GwZ7kr6TzDdOXFKyXU;)TqKeCGvsVm*w+gI$TC=N&6y~<<{5qW zGUfX$Y0>r~?V<_oYw`3N9=E?lkA#b#Sw5kK(lt~|^}n8HBv~Y63`zZZOkZj#Hp&rG zu;hP$8!{lX89=IeT3tK4I3r|%?x4tV^Aue zOA`~VNcLoU-^Hw;HJOctnpnM%x3=bCJ=z;)C7`7~>3ShWC$)$up`*QJ>(=Ponu+2U z!sIjU+=G&>pH3c2AGaQT%LOBrNwG+(!uM_mB6JT|=5_%QWoDJb*g62FC0JC!IEEB2 zV;o=VMLuWw5KL5??l$l4b1(h%00TLR?wFjln3PzRg!T(e*}X~Q8`G3WC4R=UYF9ADm7QWo>)JR zg);BZ;$>~gM-OSMp=R?P(<@={od$~80TqV_9?M!yf>Y)h*&_fp^G}WcZ>|6Ter5kX F_HW4}ge(96 literal 0 HcmV?d00001 diff --git a/dlp/snippets/install-without-bom/src/test/resources/test.png b/dlp/snippets/install-without-bom/src/test/resources/test.png new file mode 100644 index 0000000000000000000000000000000000000000..748f46cdcb504479bc1018fa16ab90dfb95aee5e GIT binary patch literal 5109 zcmVTfl&E-1Qo{DFY7R7DU7 zO(c{MNKZ&eZ=_E$X_LwHH}C%bNWehe8zux-bm#k5J~#KCd(J)IbMCqKy*DTJMGoP zX`a8rY9QAM>))Rp$a!!9w&Rz)w8EGFu=KHwT=mxMAR&54^8PsB42yf`)iDl_a5;51 zmymc=+-qCbz4Q6s{`$CdknUu({kK|>L5IvA1`pH4zXE>okn{AvKl6k*XU7|-%Z*4f ze(9!FK9zeu+I?O38*2AQfU@$^ab64kpu@RCCr+2#*j}v%007c0a^9ktFh55LQa9vY zJ9a3mUW*wU3HRs~E64b{+lz2_Q$hOigK5<&3;*ndb=Wn!_0Eq+U%$+~Q$C0CJ&QCqMFSAyQ z0gz4j)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>MQ8zove+bG_!w8>77R#q~~1cV66^ z{oMMw|+Fa%=~-W*f%-e)&719Zwg-b6z0Ij_VzW}Z87 zxw_pzibP1OHuJFX!SOrHpO&0FI1bU1d=%*y?{n_3;#UDyrhfPF!~13mEAzii%ztR& ztguGMqXR9?{^68y zzkl3s^B@DC*!W@;S&_0YrNbH>R#?#&*64V&fO&3{;{W`tn4t8nHX00000NkvXXu0mjfvR)b@ literal 0 HcmV?d00001 diff --git a/dlp/snippets/install-without-bom/src/test/resources/test.txt b/dlp/snippets/install-without-bom/src/test/resources/test.txt new file mode 100644 index 00000000000..f30af240c72 --- /dev/null +++ b/dlp/snippets/install-without-bom/src/test/resources/test.txt @@ -0,0 +1 @@ +My phone number is (223) 456-7890 and my email address is gary@example.com. \ No newline at end of file diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 169f06bd714..58290cc4860 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -23,14 +23,20 @@ UTF-8 - + com.google.cloud google-cloud-dlp 2.0.0 + + + com.google.cloud + google-cloud-pubsub + 1.108.0 + junit junit @@ -44,7 +50,6 @@ test - diff --git a/dlp/snippets/snapshot/src/test/resources/dates.csv b/dlp/snippets/snapshot/src/test/resources/dates.csv new file mode 100644 index 00000000000..290a85dec68 --- /dev/null +++ b/dlp/snippets/snapshot/src/test/resources/dates.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,01/01/1970,4532908762519852,07/21/1996 +James,03/06/1988,4301261899725540,04/09/2001 +Dan,08/14/1945,4620761856015295,11/15/2011 +Laura,11/03/1992,4564981067258901,01/04/2017 diff --git a/dlp/snippets/snapshot/src/test/resources/results.correct.csv b/dlp/snippets/snapshot/src/test/resources/results.correct.csv new file mode 100644 index 00000000000..5b078fe825a --- /dev/null +++ b/dlp/snippets/snapshot/src/test/resources/results.correct.csv @@ -0,0 +1,5 @@ +name,birth_date,credit_card,register_date +Ann,1970-01-06,4532908762519852,1996-07-26 +James,1988-03-11,4301261899725540,2001-04-14 +Dan,1945-08-19,4620761856015295,2011-11-20 +Laura,1992-11-08,4564981067258901,2017-01-09 diff --git a/dlp/snippets/snapshot/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/snapshot/src/test/resources/sensitive-data-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6e2d84546e4c623df6dbc5c9cb45813e468ecf82 GIT binary patch literal 78548 zcmeFa2V7Li(l>mDAt)kR1QZEF&IrPg5ff1) z2ML0bGfGY~^PT~9_inhm``o?ncklN;$KRPb^y%*Es;=(o`d4*}{eb-h98;82kOLqP z0JsAF1F)ZgtFkw3tpGq-8Q=r};1B@0XA9tiPhb{+7Q6ufii7}A@Ed|lL*jjZOHhr3 zet(9};4)$t0TDGDXLn~e8|NF$g6H@EkxL57__*4@YybJo{^PM8hR^{7@Em_O;PB&x ztxNvcmjL-8=nO$M6mlBCBZolAA=tM76G)Q)vVZLt13w^mP<#SHqCF!@%I@ zvGIw?sp*;7xvwj$YwH`ETiZK0zCd{%umye|aP|wn$U(mF@bRJeL^!@6cwRWh$?*wJ z@e>}GRwugda^kc=;30}jktxNm4zmbqe4#XR?Ib?QD)jlxR~&2moc%e*g8oOG{b1}T zzJ>r9fPVktqo?P)%*V%f+2}HO8MzzbF85IP{VVj_mA!wx#a+WcE-Y9H*xN zA)#wi2>}UHfBC|G1l7_AI|z_KA)qor$pIKJ%bpqn{J2?IDAc70{`da3%76*m@sCpf zc@O;W^H19NH_8Ir`M)Cn8^!r!!uTh3V!Qq`M4nE>!ctej15l{T{y%ZUvEBa}g8wJF z@n`hszbOy4=XXRNEj|`-GK3w8_rLewE(0=b@4nQpPKcPg)1teYgq0Pb2Ec+`ZN5#EF)sG|xFiiIC1pSvVn zQzML_Y=gg+y7&eQAmHnH27Q>pWxVrm;O<{+@D?dFjk|<-PZ1Mo*g$%8yf#pG7hhP9 z2Zwa%=&Cijl3ikl*!)#~kP(E+YELzv2gF!6Gs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4`b4SNHac)z?uMYAHrBeH1GAciF&Noii6l6l=f~3wBiWBw!V@$;~;8HnBE{pi% z9vYCjrbLflrP87lg;t@1 zLw|h>A+c#$lIUK}yBfRka2*_l$7^{9tA_x~;tK*yh=;Yqxi@*1&hca<`r{6n9!g(6 znn;u8Cc(70ewf*Tg`L%BuOk3aWBT*-h?=1CCO0{sB<;BMhgf^nesPw}=deH5XG2Y? z6lUqO2rv{E91m4$B<9Ad)ax6#04uTODt&Im{P+C4D~&~Kjzj)#52G0}v_5@yv#gMu z`MG!RFdSltmJf_-GwZ7kr6TzDdOXFKyXU;)TqKeCGvsVm*w+gI$TC=N&6y~<<{5qW zGUfX$Y0>r~?V<_oYw`3N9=E?lkA#b#Sw5kK(lt~|^}n8HBv~Y63`zZZOkZj#Hp&rG zu;hP$8!{lX89=IeT3tK4I3r|%?x4tV^Aue zOA`~VNcLoU-^Hw;HJOctnpnM%x3=bCJ=z;)C7`7~>3ShWC$)$up`*QJ>(=Ponu+2U z!sIjU+=G&>pH3c2AGaQT%LOBrNwG+(!uM_mB6JT|=5_%QWoDJb*g62FC0JC!IEEB2 zV;o=VMLuWw5KL5??l$l4b1(h%00TLR?wFjln3PzRg!T(e*}X~Q8`G3WC4R=UYF9ADm7QWo>)JR zg);BZ;$>~gM-OSMp=R?P(<@={od$~80TqV_9?M!yf>Y)h*&_fp^G}WcZ>|6Ter5kX F_HW4}ge(96 literal 0 HcmV?d00001 diff --git a/dlp/snippets/snapshot/src/test/resources/test.png b/dlp/snippets/snapshot/src/test/resources/test.png new file mode 100644 index 0000000000000000000000000000000000000000..748f46cdcb504479bc1018fa16ab90dfb95aee5e GIT binary patch literal 5109 zcmVTfl&E-1Qo{DFY7R7DU7 zO(c{MNKZ&eZ=_E$X_LwHH}C%bNWehe8zux-bm#k5J~#KCd(J)IbMCqKy*DTJMGoP zX`a8rY9QAM>))Rp$a!!9w&Rz)w8EGFu=KHwT=mxMAR&54^8PsB42yf`)iDl_a5;51 zmymc=+-qCbz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fAd4N9soM?kL{H$UixgJJ*lfNKDpVY3? zS&mM)IVCyk>FMj=8n4o5nrfOl+5JvcTsf37Z{emjlvdN+)@n5O#GD0|MTf;qW>%h& zOF7*bfNr{+ocH|PO<&BT3eRl)GLMPm%rY5mw|qgEEkX?RMof*27-Yy$)mILkk6Zfs zhMAg%jQkqC7pv{;R^9DQsv);v#+=8U3Qw1x`>MQ8zove+bG_!w8>77R#q~~1cV66^ z{oMMw|+Fa%=~-W*f%-e)&719Zwg-b6z0Ij_VzW}Z87 zxw_pzibP1OHuJFX!SOrHpO&0FI1bU1d=%*y?{n_3;#UDyrhfPF!~13mEAzii%ztR& ztguGMqXR9?{^68y zzkl3s^B@DC*!W@;S&_0YrNbH>R#?#&*64V&fO&3{;{W`tn4t8nHX00000NkvXXu0mjfvR)b@ literal 0 HcmV?d00001 diff --git a/dlp/snippets/snapshot/src/test/resources/test.txt b/dlp/snippets/snapshot/src/test/resources/test.txt new file mode 100644 index 00000000000..f30af240c72 --- /dev/null +++ b/dlp/snippets/snapshot/src/test/resources/test.txt @@ -0,0 +1 @@ +My phone number is (223) 456-7890 and my email address is gary@example.com. \ No newline at end of file diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7104c0e05c3..09d8d0284e6 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -42,8 +42,11 @@ com.google.cloud google-cloud-dlp - - + + + com.google.cloud + google-cloud-pubsub + junit junit @@ -56,5 +59,7 @@ 1.0.1 test + + From 9df4301ac3e16c2298dfb23044a84f08b5f3e820 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 4 Aug 2020 04:25:45 +0200 Subject: [PATCH 097/406] chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#235) --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 09d8d0284e6..8733edbc1eb 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 8.0.0 + 8.1.0 pom import From 1800c5d3acd8545b16bc4c09ec5566c154486345 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 4 Aug 2020 13:54:20 -0700 Subject: [PATCH 098/406] chore: regenerate README samples (#239) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4cf18a81-7352-443d-b1ea-d334a41135a1/targets - [ ] To automatically regenerate this PR, check this box. --- dlp/snippets/snippets/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 8733edbc1eb..9228186c134 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -42,7 +42,7 @@ com.google.cloud google-cloud-dlp - + com.google.cloud google-cloud-pubsub @@ -59,7 +59,7 @@ 1.0.1 test - + From 6eb78f9dcb603493e6a51de74e89cc6afecce6b4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2020 17:00:04 +0000 Subject: [PATCH 099/406] chore: release 2.1.0 (#234) :robot: I have created a release \*beep\* \*boop\* --- ## [2.1.0](https://www.github.com/googleapis/java-dlp/compare/v2.0.0...v2.1.0) (2020-08-10) ### Features * add CSV and TSV to file types ([#232](https://www.github.com/googleapis/java-dlp/issues/232)) ([2f44354](https://www.github.com/googleapis/java-dlp/commit/2f44354fb6ebc7feaf1723b3fc287703dd6bea89)) ### Bug Fixes * migrate dlp/v2 to grpc_service_config ([#231](https://www.github.com/googleapis/java-dlp/issues/231)) ([e558868](https://www.github.com/googleapis/java-dlp/commit/e558868cd52c1f6f81cec647a46903b9cf562686)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.2 ([#228](https://www.github.com/googleapis/java-dlp/issues/228)) ([e252739](https://www.github.com/googleapis/java-dlp/commit/e25273959b8e6369266d79c3c947697063c22509)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.3 ([#233](https://www.github.com/googleapis/java-dlp/issues/233)) ([96530e4](https://www.github.com/googleapis/java-dlp/commit/96530e4d11bfbc5298559c4790ff55a1730f810a)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.6 ([#240](https://www.github.com/googleapis/java-dlp/issues/240)) ([f96525e](https://www.github.com/googleapis/java-dlp/commit/f96525e2b7fc8b2469f69d8f0049fd3d6393e8a8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 58290cc4860..34cb8a49fef 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.0.0 + 2.1.0 From 36bb3c2c4b15c962fb32ba0a339c7a5799f6c272 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2020 11:21:02 -0400 Subject: [PATCH 100/406] chore: release 2.1.1-SNAPSHOT * chore: updated versions.txt [ci skip] * chore: updated samples/pom.xml [ci skip] * chore: updated samples/install-without-bom/pom.xml [ci skip] * chore: updated samples/snippets/pom.xml [ci skip] * chore: updated google-cloud-dlp-bom/pom.xml [ci skip] * chore: updated google-cloud-dlp/pom.xml [ci skip] * chore: updated grpc-google-cloud-dlp-v2/pom.xml [ci skip] * chore: updated pom.xml [ci skip] * chore: updated proto-google-cloud-dlp-v2/pom.xml [ci skip] * chore: updated samples/snapshot/pom.xml Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 34cb8a49fef..80c46e80fe9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.1.0 + 2.1.1-SNAPSHOT From 8c0bf34012fdd80d72105b34d262bd820aab30bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 Aug 2020 04:33:37 +0200 Subject: [PATCH 101/406] chore(deps): update dependency com.google.cloud:libraries-bom to v9 --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 9228186c134..117869e8cd1 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 8.1.0 + 9.0.0 pom import From 371b75509c5ca4b7e45b639c17be17c8788fd4ff Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Aug 2020 00:04:13 +0200 Subject: [PATCH 102/406] chore(deps): update dependency com.google.cloud:libraries-bom to v9.1.0 --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 117869e8cd1..1e0c25423a1 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 9.0.0 + 9.1.0 pom import From d5805444728aacefe353133c485f60119f479830 Mon Sep 17 00:00:00 2001 From: Ajit Thakor <49403056+athakor@users.noreply.github.com> Date: Tue, 1 Sep 2020 18:31:17 +0530 Subject: [PATCH 103/406] fix: flaky testInspectStringMultipleRulesPatientRule (#264) --- .../snippets/src/test/java/dlp/snippets/InspectTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 340bb8514be..27662b5aa8b 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -231,10 +231,10 @@ public void testInspectStringCustomHotwordNegativeExample() throws Exception { @Test public void testInspectStringMultipleRulesPatientRule() throws Exception { InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, - "patient: Jane Doe"); + "patient name: Jane Doe"); String output = bout.toString(); - assertThat(output).contains("VERY_LIKELY"); + assertThat(output).contains("LIKELY"); } @Test From 7d4b8c11132f719b1a9fdf8eaa1188cd494f99e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 20:39:35 +0200 Subject: [PATCH 104/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.1.0 (#247) --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 75821f942b7..8b5994cddbe 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.0.0 + 2.1.0 From 81f2ed38ae7a2fbe0981b35b793b5c578db06f3b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 20:40:03 +0200 Subject: [PATCH 105/406] chore(deps): update dependency com.google.cloud:libraries-bom to v10 (#262) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `9.1.0` -> `10.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 1e0c25423a1..10003c9d783 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 9.1.0 + 10.1.0 pom import From df6fbc19c230435e9f87ed21503fb544bf11b161 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Sep 2020 20:40:12 +0200 Subject: [PATCH 106/406] chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.108.1 (#241) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 8b5994cddbe..3913e54cf04 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.108.0 + 1.108.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 80c46e80fe9..972246d7268 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.108.0 + 1.108.1 junit From f0d8162c44eed72b982cae7149b0a16faa909ad5 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 14 Sep 2020 14:04:21 -0700 Subject: [PATCH 107/406] samples: bring back samples README (#271) --- dlp/snippets/snippets/README.md | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 dlp/snippets/snippets/README.md diff --git a/dlp/snippets/snippets/README.md b/dlp/snippets/snippets/README.md new file mode 100644 index 00000000000..2fa66e246b4 --- /dev/null +++ b/dlp/snippets/snippets/README.md @@ -0,0 +1,59 @@ +# Cloud Data Loss Prevention (DLP) API Samples + + +Open in Cloud Shell + +The [Data Loss Prevention API](https://cloud.google.com/dlp/docs/) provides programmatic access to +a powerful detection engine for personally identifiable information and other privacy-sensitive data + in unstructured data streams. + +## Setup +- A Google Cloud project with billing enabled +- [Enable](https://console.cloud.google.com/launcher/details/google/dlp.googleapis.com) the DLP API. +- [Create a service account](https://cloud.google.com/docs/authentication/getting-started) +and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to the downloaded credentials file. + +## Running + +To run a specific sample, edit any variables under the `TODO(developer):` in the +function at the top of each sample, and then execute the function as convenient. + +For example, if using the command line you might use the following (replacing +`` with the name of the sample): +```bash +mvn exec:java -Dexec.mainClass="dlp.snippets." +``` + + +## Testing + +### Setup +- Ensure that `GOOGLE_APPLICATION_CREDENTIALS` points to authorized service account credentials file. +- Set the `DLP_DEID_WRAPPED_KEY` environment variable to an AES-256 key encrypted ('wrapped') [with a Cloud Key Management Service (KMS) key](https://cloud.google.com/kms/docs/encrypt-decrypt). +- Set the `DLP_DEID_KEY_NAME` environment variable to the path-name of the Cloud KMS key you wrapped `DLP_DEID_WRAPPED_KEY` with. +- [Create a Google Cloud Storage bucket](https://console.cloud.google.com/storage) and upload [test.txt](src/test/resources/test.txt). + - Set the `GCS_PATH` environment variable to point to the path for the bucket. +- Copy and paste the data below into a CSV file and [create a BigQuery table](https://cloud.google.com/bigquery/docs/loading-data-local) from the file: + ```$xslt + Name,TelephoneNumber,Mystery,Age,Gender + James,(567) 890-1234,8291 3627 8250 1234,19,Male + Gandalf,(223) 456-7890,4231 5555 6781 9876,27,Male + Dumbledore,(313) 337-1337,6291 8765 1095 7629,27,Male + Joe,(452) 223-1234,3782 2288 1166 3030,35,Male + Marie,(452) 223-1234,8291 3627 8250 1234,35,Female + Carrie,(567) 890-1234,2253 5218 4251 4526,35,Female + ``` + - Set the `BIGQUERY_DATASET` and `BIGQUERY_TABLE` environment values. +- [Create a Google Cloud Pub/Sub](https://console.cloud.google.com/datastore) topic and and a subscription that is subscribed to the topic. + - Set the `PUB_SUB_TOPIC` and `PUB_SUB_SUBSCRIPTION` environment variables to the corresponding values. +- [Create a Google Cloud Datastore](https://console.cloud.google.com/datastore) kind and add an entity with properties: + - `property1` : john@doe.com + - `property2` : 343-343-3435 +- Update the Datastore kind in [InspectTests.java](src/test/java/dlp/snippets/InspectTests.java). + + +### Run +Run all tests: +``` + mvn clean verify +``` From c8f29e711855e252e21cf828915d0605404477f8 Mon Sep 17 00:00:00 2001 From: Ajit Thakor <49403056+athakor@users.noreply.github.com> Date: Wed, 23 Sep 2020 22:22:49 +0530 Subject: [PATCH 108/406] test(samples): flakey snippets RiskAnalysisTests#testLDiversity test + Dlp samples format's (#278) * fix: flakey snippets tests * build: fix ci lint * fix: sample failures --- .../snippets/DeIdentifyTableBucketing.java | 47 +- .../DeIdentifyTableConditionInfoTypes.java | 106 +-- .../DeIdentifyTableConditionMasking.java | 80 +-- .../snippets/DeIdentifyTableInfoTypes.java | 81 +-- .../snippets/DeIdentifyTableRowSuppress.java | 72 ++- .../dlp/snippets/DeIdentifyTableWithFpe.java | 49 +- .../dlp/snippets/DeIdentifyWithInfoType.java | 31 +- .../dlp/snippets/DeIdentifyWithRedaction.java | 28 +- .../snippets/DeIdentifyWithReplacement.java | 34 +- .../dlp/snippets/InspectBigQueryTable.java | 5 +- .../InspectBigQueryTableWithSampling.java | 5 +- .../dlp/snippets/InspectDatastoreEntity.java | 5 +- .../java/dlp/snippets/InspectGcsFile.java | 9 +- .../java/dlp/snippets/InspectImageFile.java | 7 +- .../InspectImageFileAllInfoTypes.java | 3 +- .../InspectImageFileListedInfoTypes.java | 5 +- .../java/dlp/snippets/InspectPhoneNumber.java | 4 +- .../main/java/dlp/snippets/InspectString.java | 5 +- ...InspectStringCustomExcludingSubstring.java | 20 +- .../snippets/InspectStringCustomHotword.java | 4 +- .../snippets/InspectStringOmitOverlap.java | 7 +- .../InspectStringWithExclusionDict.java | 11 +- ...spectStringWithExclusionDictSubstring.java | 14 +- .../InspectStringWithExclusionRegex.java | 8 +- .../snippets/InspectStringWithoutOverlap.java | 7 +- .../main/java/dlp/snippets/InspectTable.java | 28 +- .../java/dlp/snippets/InspectTextFile.java | 7 +- .../dlp/snippets/InspectWithCustomRegex.java | 8 +- .../dlp/snippets/ReIdentifyTableWithFpe.java | 21 +- .../java/dlp/snippets/RedactImageFile.java | 1 - .../RedactImageFileColoredInfoTypes.java | 35 +- .../RedactImageFileListedInfoTypes.java | 13 +- .../dlp/snippets/RiskAnalysisLDiversity.java | 15 +- .../dlp/snippets/DeIdentificationTests.java | 612 ++++++++++-------- .../test/java/dlp/snippets/InspectTests.java | 121 ++-- .../test/java/dlp/snippets/RedactTests.java | 22 +- .../java/dlp/snippets/RiskAnalysisTests.java | 33 +- .../src/test/java/dlp/snippets/TestBase.java | 9 +- 38 files changed, 824 insertions(+), 748 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java index 055c19c7658..bf3d70823d4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java @@ -39,26 +39,30 @@ public class DeIdentifyTableBucketing { public static void deIdentifyTableBucketing() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); deIdentifyTableBucketing(projectId, tableToDeIdentify); } @@ -111,8 +115,7 @@ public static Table deIdentifyTableBucketing(String projectId, Table tableToDeId DeidentifyContentResponse response = dlp.deidentifyContent(request); // Print the results. - System.out.println( - "Table after de-identification: " + response.getItem().getTable()); + System.out.println("Table after de-identification: " + response.getItem().getTable()); return response.getItem().getTable(); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java index 0737f97b903..4fe50794f3b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java @@ -50,32 +50,41 @@ public class DeIdentifyTableConditionInfoTypes { public static void deIdentifyTableConditionInfoTypes() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in Jane Austen's novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "Charles Dickens name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in Jane Austen's novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); deIdentifyTableConditionInfoTypes(projectId, tableToDeIdentify); } @@ -95,8 +104,10 @@ public static Table deIdentifyTableConditionInfoTypes(String projectId, Table ta // Specify that findings should be replaced with corresponding info type name. ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = ReplaceWithInfoTypeConfig.getDefaultInstance(); - PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() - .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig).build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig) + .build(); // Associate info type with the replacement strategy InfoTypeTransformation infoTypeTransformation = InfoTypeTransformation.newBuilder() @@ -104,29 +115,29 @@ public static Table deIdentifyTableConditionInfoTypes(String projectId, Table ta .setPrimitiveTransformation(primitiveTransformation) .build(); InfoTypeTransformations infoTypeTransformations = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformation) - .build(); + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); // Specify fields to be de-identified. - List fieldIds = Stream.of("PATIENT", "FACTOID") - .map(id -> FieldId.newBuilder().setName(id).build()) - .collect(Collectors.toList()); + List fieldIds = + Stream.of("PATIENT", "FACTOID") + .map(id -> FieldId.newBuilder().setName(id).build()) + .collect(Collectors.toList()); // Specify when the above fields should be de-identified. - Condition condition = Condition.newBuilder() - .setField(FieldId.newBuilder().setName("AGE").build()) - .setOperator(RelationalOperator.GREATER_THAN) - .setValue(Value.newBuilder().setIntegerValue(89).build()) - .build(); + Condition condition = + Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()) + .build(); // Apply the condition to records - RecordCondition recordCondition = RecordCondition.newBuilder() - .setExpressions(Expressions.newBuilder() - .setConditions(Conditions.newBuilder() - .addConditions(condition) - .build()) - .build()) - .build(); + RecordCondition recordCondition = + RecordCondition.newBuilder() + .setExpressions( + Expressions.newBuilder() + .setConditions(Conditions.newBuilder().addConditions(condition).build()) + .build()) + .build(); // Associate the de-identification and conditions with the specified fields. FieldTransformation fieldTransformation = @@ -153,8 +164,7 @@ public static Table deIdentifyTableConditionInfoTypes(String projectId, Table ta DeidentifyContentResponse response = dlp.deidentifyContent(request); // Print the results. - System.out.println( - "Table after de-identification: " + response.getItem().getTable()); + System.out.println("Table after de-identification: " + response.getItem().getTable()); return response.getItem().getTable(); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java index 71083fe6276..4da5db4bf41 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java @@ -44,26 +44,30 @@ public class DeIdentifyTableConditionMasking { public static void deIdentifyTableConditionMasking() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); deIdentifyTableConditionMasking(projectId, tableToDeIdentify); } @@ -79,31 +83,28 @@ public static Table deIdentifyTableConditionMasking(String projectId, Table tabl // Specify how the content should be de-identified. CharacterMaskConfig characterMaskConfig = - CharacterMaskConfig.newBuilder() - .setMaskingCharacter("*") - .build(); + CharacterMaskConfig.newBuilder().setMaskingCharacter("*").build(); PrimitiveTransformation primitiveTransformation = - PrimitiveTransformation.newBuilder() - .setCharacterMaskConfig(characterMaskConfig) - .build(); + PrimitiveTransformation.newBuilder().setCharacterMaskConfig(characterMaskConfig).build(); // Specify field to be de-identified. FieldId fieldId = FieldId.newBuilder().setName("HAPPINESS SCORE").build(); // Specify when the above field should be de-identified. - Condition condition = Condition.newBuilder() - .setField(FieldId.newBuilder().setName("AGE").build()) - .setOperator(RelationalOperator.GREATER_THAN) - .setValue(Value.newBuilder().setIntegerValue(89).build()) - .build(); + Condition condition = + Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()) + .build(); // Apply the condition to records - RecordCondition recordCondition = RecordCondition.newBuilder() - .setExpressions(Expressions.newBuilder() - .setConditions(Conditions.newBuilder() - .addConditions(condition) - .build()) - .build()) - .build(); + RecordCondition recordCondition = + RecordCondition.newBuilder() + .setExpressions( + Expressions.newBuilder() + .setConditions(Conditions.newBuilder().addConditions(condition).build()) + .build()) + .build(); // Associate the de-identification and conditions with the specified field. FieldTransformation fieldTransformation = @@ -130,8 +131,7 @@ public static Table deIdentifyTableConditionMasking(String projectId, Table tabl DeidentifyContentResponse response = dlp.deidentifyContent(request); // Print the results. - System.out.println( - "Table after de-identification: " + response.getItem().getTable()); + System.out.println("Table after de-identification: " + response.getItem().getTable()); return response.getItem().getTable(); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java index 56070bdb678..3ea48cdb2f0 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java @@ -45,32 +45,41 @@ public class DeIdentifyTableInfoTypes { public static void deIdentifyTableInfoTypes() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in Jane Austen's novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "Charles Dickens name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in Jane Austen's novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); deIdentifyTableInfoTypes(projectId, tableToDeIdentify); } @@ -90,8 +99,10 @@ public static Table deIdentifyTableInfoTypes(String projectId, Table tableToDeId // Specify that findings should be replaced with corresponding info type name. ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = ReplaceWithInfoTypeConfig.getDefaultInstance(); - PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() - .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig).build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig) + .build(); // Associate info type with the replacement strategy InfoTypeTransformation infoTypeTransformation = InfoTypeTransformation.newBuilder() @@ -99,14 +110,13 @@ public static Table deIdentifyTableInfoTypes(String projectId, Table tableToDeId .setPrimitiveTransformation(primitiveTransformation) .build(); InfoTypeTransformations infoTypeTransformations = - InfoTypeTransformations.newBuilder() - .addTransformations(infoTypeTransformation) - .build(); + InfoTypeTransformations.newBuilder().addTransformations(infoTypeTransformation).build(); // Specify fields to be de-identified. - List fieldIds = Stream.of("PATIENT", "FACTOID") - .map(id -> FieldId.newBuilder().setName(id).build()) - .collect(Collectors.toList()); + List fieldIds = + Stream.of("PATIENT", "FACTOID") + .map(id -> FieldId.newBuilder().setName(id).build()) + .collect(Collectors.toList()); // Associate the de-identification and conditions with the specified field. FieldTransformation fieldTransformation = @@ -132,8 +142,7 @@ public static Table deIdentifyTableInfoTypes(String projectId, Table tableToDeId DeidentifyContentResponse response = dlp.deidentifyContent(request); // Print the results. - System.out.println( - "Table after de-identification: " + response.getItem().getTable()); + System.out.println("Table after de-identification: " + response.getItem().getTable()); return response.getItem().getTable(); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java index db573ee3b9f..0c02dc16649 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java @@ -42,26 +42,30 @@ public class DeIdentifyTableRowSuppress { public static void deIdentifyTableRowSuppress() throws IOException { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); deIdentifyTableRowSuppress(projectId, tableToDeIdentify); } @@ -76,24 +80,27 @@ public static Table deIdentifyTableRowSuppress(String projectId, Table tableToDe ContentItem contentItem = ContentItem.newBuilder().setTable(tableToDeIdentify).build(); // Specify when the content should be de-identified. - Condition condition = Condition.newBuilder() - .setField(FieldId.newBuilder().setName("AGE").build()) - .setOperator(RelationalOperator.GREATER_THAN) - .setValue(Value.newBuilder().setIntegerValue(89).build()).build(); + Condition condition = + Condition.newBuilder() + .setField(FieldId.newBuilder().setName("AGE").build()) + .setOperator(RelationalOperator.GREATER_THAN) + .setValue(Value.newBuilder().setIntegerValue(89).build()) + .build(); // Apply the condition to record suppression. RecordSuppression recordSuppressions = RecordSuppression.newBuilder() - .setCondition(RecordCondition.newBuilder() - .setExpressions(Expressions.newBuilder() - .setConditions(Conditions.newBuilder().addConditions(condition).build()) + .setCondition( + RecordCondition.newBuilder() + .setExpressions( + Expressions.newBuilder() + .setConditions( + Conditions.newBuilder().addConditions(condition).build()) + .build()) .build()) - .build()) .build(); // Use record suppression as the only transformation RecordTransformations transformations = - RecordTransformations.newBuilder() - .addRecordSuppressions(recordSuppressions) - .build(); + RecordTransformations.newBuilder().addRecordSuppressions(recordSuppressions).build(); DeidentifyConfig deidentifyConfig = DeidentifyConfig.newBuilder().setRecordTransformations(transformations).build(); @@ -110,8 +117,7 @@ public static Table deIdentifyTableRowSuppress(String projectId, Table tableToDe DeidentifyContentResponse response = dlp.deidentifyContent(request); // Print the results. - System.out.println( - "Table after de-identification: " + response.getItem().getTable()); + System.out.println("Table after de-identification: " + response.getItem().getTable()); return response.getItem().getTable(); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java index 0d57d368ff4..7fb249f6e48 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java @@ -29,10 +29,6 @@ import com.google.privacy.dlp.v2.DeidentifyContentResponse; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.FieldTransformation; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InfoTypeTransformations; -import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; -import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; @@ -42,7 +38,6 @@ import com.google.privacy.dlp.v2.Value; import com.google.protobuf.ByteString; import java.io.IOException; -import java.util.Arrays; public class DeIdentifyTableWithFpe { @@ -55,26 +50,30 @@ public static void main(String[] args) throws Exception { + "keyRings/YOUR_KEYRING_NAME/" + "cryptoKeys/YOUR_KEY_NAME"; String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) - .addHeaders(FieldId.newBuilder().setName("Date").build()) - .addHeaders(FieldId.newBuilder().setName("Compensation").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("11111").build()) - .addValues(Value.newBuilder().setStringValue("2015").build()) - .addValues(Value.newBuilder().setStringValue("$10").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("11111").build()) - .addValues(Value.newBuilder().setStringValue("2016").build()) - .addValues(Value.newBuilder().setStringValue("$20").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22222").build()) - .addValues(Value.newBuilder().setStringValue("2016").build()) - .addValues(Value.newBuilder().setStringValue("$15").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addHeaders(FieldId.newBuilder().setName("Date").build()) + .addHeaders(FieldId.newBuilder().setName("Compensation").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2015").build()) + .addValues(Value.newBuilder().setStringValue("$10").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$20").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22222").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$15").build()) + .build()) + .build(); deIdentifyTableWithFpe(projectId, tableToDeIdentify, kmsKeyName, wrappedAesKey); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java index 0899c2bbf1c..bc830dcde1d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java @@ -37,8 +37,7 @@ public class DeIdentifyWithInfoType { public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - String textToInspect = - "My email is test@example.com"; + String textToInspect = "My email is test@example.com"; deIdentifyWithInfoType(projectId, textToInspect); } @@ -49,8 +48,7 @@ public static void deIdentifyWithInfoType(String projectId, String textToRedact) // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the content to be inspected. - ContentItem item = ContentItem.newBuilder() - .setValue(textToRedact).build(); + ContentItem item = ContentItem.newBuilder().setValue(textToRedact).build(); // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types @@ -60,19 +58,22 @@ public static void deIdentifyWithInfoType(String projectId, String textToRedact) ReplaceWithInfoTypeConfig replaceWithInfoTypeConfig = ReplaceWithInfoTypeConfig.newBuilder().build(); // Define type of deidentification as replacement with info type. - PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() - .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig) - .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setReplaceWithInfoTypeConfig(replaceWithInfoTypeConfig) + .build(); // Associate deidentification type with info type. - InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() - .addInfoTypes(infoType) - .setPrimitiveTransformation(primitiveTransformation) - .build(); + InfoTypeTransformation transformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); // Construct the configuration for the Redact request and list all desired transformations. - DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() - .addTransformations(transformation)) - .build(); + DeidentifyConfig redactConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations( + InfoTypeTransformations.newBuilder().addTransformations(transformation)) + .build(); // Construct the Redact request to be sent by the client. DeidentifyContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java index a4fca89df70..4c7f748bc1f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java @@ -48,27 +48,29 @@ public static void deIdentifyWithRedaction(String projectId, String textToRedact // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the content to be inspected. - ContentItem item = ContentItem.newBuilder() - .setValue(textToRedact).build(); + ContentItem item = ContentItem.newBuilder().setValue(textToRedact).build(); // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types InfoType infoType = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); InspectConfig inspectConfig = InspectConfig.newBuilder().addInfoTypes(infoType).build(); // Define type of deidentification. - PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() - .setRedactConfig(RedactConfig.getDefaultInstance()) - .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder() + .setRedactConfig(RedactConfig.getDefaultInstance()) + .build(); // Associate deidentification type with info type. - InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() - .addInfoTypes(infoType) - .setPrimitiveTransformation(primitiveTransformation) - .build(); + InfoTypeTransformation transformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); // Construct the configuration for the Redact request and list all desired transformations. - DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() - .addTransformations(transformation)) - .build(); + DeidentifyConfig redactConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations( + InfoTypeTransformations.newBuilder().addTransformations(transformation)) + .build(); // Construct the Redact request to be sent by the client. DeidentifyContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java index 824bd8d3db3..3a578f05851 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java @@ -29,7 +29,6 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; -import com.google.privacy.dlp.v2.RedactConfig; import com.google.privacy.dlp.v2.ReplaceValueConfig; import com.google.privacy.dlp.v2.Value; @@ -50,31 +49,32 @@ public static void deIdentifyWithReplacement(String projectId, String textToReda // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the content to be inspected. - ContentItem item = ContentItem.newBuilder() - .setValue(textToRedact).build(); + ContentItem item = ContentItem.newBuilder().setValue(textToRedact).build(); // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types InfoType infoType = InfoType.newBuilder().setName("EMAIL_ADDRESS").build(); InspectConfig inspectConfig = InspectConfig.newBuilder().addInfoTypes(infoType).build(); // Specify replacement string to be used for the finding. - ReplaceValueConfig replaceValueConfig = ReplaceValueConfig.newBuilder() - .setNewValue(Value.newBuilder().setStringValue("[email-address]").build()) - .build(); + ReplaceValueConfig replaceValueConfig = + ReplaceValueConfig.newBuilder() + .setNewValue(Value.newBuilder().setStringValue("[email-address]").build()) + .build(); // Define type of deidentification as replacement. - PrimitiveTransformation primitiveTransformation = PrimitiveTransformation.newBuilder() - .setReplaceConfig(replaceValueConfig) - .build(); + PrimitiveTransformation primitiveTransformation = + PrimitiveTransformation.newBuilder().setReplaceConfig(replaceValueConfig).build(); // Associate deidentification type with info type. - InfoTypeTransformation transformation = InfoTypeTransformation.newBuilder() - .addInfoTypes(infoType) - .setPrimitiveTransformation(primitiveTransformation) - .build(); + InfoTypeTransformation transformation = + InfoTypeTransformation.newBuilder() + .addInfoTypes(infoType) + .setPrimitiveTransformation(primitiveTransformation) + .build(); // Construct the configuration for the Redact request and list all desired transformations. - DeidentifyConfig redactConfig = DeidentifyConfig.newBuilder() - .setInfoTypeTransformations(InfoTypeTransformations.newBuilder() - .addTransformations(transformation)) - .build(); + DeidentifyConfig redactConfig = + DeidentifyConfig.newBuilder() + .setInfoTypeTransformations( + InfoTypeTransformations.newBuilder().addTransformations(transformation)) + .build(); // Construct the Redact request to be sent by the client. DeidentifyContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index 032641f2609..ac6335c8064 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -93,10 +93,7 @@ public static void inspectBigQueryTable( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java index a5336cdaea1..0c560653959 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -88,10 +88,7 @@ public static void inspectBigQueryTableWithSampling( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addInfoTypes(infoType) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addInfoTypes(infoType).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index c601747db44..a37d2f1873b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -94,10 +94,7 @@ public static void insepctDatastoreEntity( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 102affcaf98..d6efdfa9fbc 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -67,9 +67,7 @@ public static void inspectGcsFile( try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the GCS file to be inspected. CloudStorageOptions cloudStorageOptions = - CloudStorageOptions.newBuilder() - .setFileSet(FileSet.newBuilder().setUrl(gcsUri)) - .build(); + CloudStorageOptions.newBuilder().setFileSet(FileSet.newBuilder().setUrl(gcsUri)).build(); StorageConfig storageConfig = StorageConfig.newBuilder().setCloudStorageOptions(cloudStorageOptions).build(); @@ -83,10 +81,7 @@ public static void inspectGcsFile( // Specify how the content should be inspected. InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Specify the action that is triggered when the job completes. String pubSubTopic = String.format("projects/%s/topics/%s", projectId, topicId); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java index 2103b008818..2251abbff46 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java @@ -58,16 +58,13 @@ public static void inspectImageFile(String projectId, String filePath) throws IO // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java index 1cb5aac931f..87847fb7b6e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java @@ -39,8 +39,7 @@ public static void main(String[] args) throws IOException { inspectImageFileAllInfoTypes(projectId, inputPath); } - static void inspectImageFileAllInfoTypes(String projectId, String inputPath) - throws IOException { + static void inspectImageFileAllInfoTypes(String projectId, String inputPath) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java index 86e73022a45..85aa82ac186 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java @@ -63,10 +63,7 @@ static void inspectImageFileListedInfoTypes(String projectId, String inputPath) } // Construct the configuration for the Inspect request. - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); + InspectConfig inspectConfig = InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java index 6c21e8bd43a..c707088cc3c 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java @@ -45,9 +45,7 @@ public static void inspectString(String projectId, String textToInspect) throws // the "close" method on the client to safely clean up any remaining background resources. try (DlpServiceClient dlp = DlpServiceClient.create()) { // Specify the type and content to be inspected. - ContentItem item = ContentItem.newBuilder() - .setValue(textToInspect) - .build(); + ContentItem item = ContentItem.newBuilder().setValue(textToInspect).build(); // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java index 80c5040c8d3..28f0d08628f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java @@ -65,10 +65,7 @@ public static void inspectString(String projectId, String textToInspect) throws // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java index 1201a3643f4..015367d9708 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java @@ -49,13 +49,17 @@ public static void main(String[] args) throws Exception { String textToInspect = "Name: Doe, John. Name: Example, Jimmy"; String customDetectorPattern = "[A-Z][a-z]{1,15}, [A-Z][a-z]{1,15}"; List excludedSubstringList = Arrays.asList("Jimmy"); - inspectStringCustomExcludingSubstring(projectId, textToInspect, customDetectorPattern, - excludedSubstringList); + inspectStringCustomExcludingSubstring( + projectId, textToInspect, customDetectorPattern, excludedSubstringList); } // Inspects the provided text, avoiding matches specified in the exclusion list. - public static void inspectStringCustomExcludingSubstring(String projectId, String textToInspect, - String customDetectorPattern, List excludedSubstringList) throws IOException { + public static void inspectStringCustomExcludingSubstring( + String projectId, + String textToInspect, + String customDetectorPattern, + List excludedSubstringList) + throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -72,15 +76,17 @@ public static void inspectStringCustomExcludingSubstring(String projectId, Strin InfoType infoType = InfoType.newBuilder().setName("CUSTOM_NAME_DETECTOR").build(); CustomInfoType customInfoType = CustomInfoType.newBuilder() - .setInfoType(infoType).setRegex(Regex.newBuilder().setPattern(customDetectorPattern)) + .setInfoType(infoType) + .setRegex(Regex.newBuilder().setPattern(customDetectorPattern)) .build(); // Exclude partial matches from the specified excludedSubstringList. ExclusionRule exclusionRule = ExclusionRule.newBuilder() .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .setDictionary( + Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java index a5408f9f68e..254d8f86413 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java @@ -49,8 +49,8 @@ public static void main(String[] args) throws Exception { } // Inspects the provided text. - public static void inspectStringCustomHotword(String projectId, String textToInspect, - String customHotword) throws IOException { + public static void inspectStringCustomHotword( + String projectId, String textToInspect, String customHotword) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java index 6786a290d49..83e83076802 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java @@ -65,15 +65,16 @@ public static void inspectStringOmitOverlap(String projectId, String textToInspe // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. List infoTypes = new ArrayList<>(); - for (String typeName : new String[]{"PERSON_NAME", "EMAIL_ADDRESS"}) { + for (String typeName : new String[] {"PERSON_NAME", "EMAIL_ADDRESS"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } // Exclude EMAIL_ADDRESS matches ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setExcludeInfoTypes(ExcludeInfoTypes.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java index a73bffc08c6..3db325814d2 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java @@ -51,8 +51,8 @@ public static void main(String[] args) throws Exception { } // Inspects the provided text, avoiding matches specified in the exclusion list. - public static void inspectStringWithExclusionDict(String projectId, String textToInspect, - List excludedMatchList) throws IOException { + public static void inspectStringWithExclusionDict( + String projectId, String textToInspect, List excludedMatchList) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -68,7 +68,7 @@ public static void inspectStringWithExclusionDict(String projectId, String textT // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. List infoTypes = new ArrayList<>(); - for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } @@ -76,8 +76,9 @@ public static void inspectStringWithExclusionDict(String projectId, String textT ExclusionRule exclusionRule = ExclusionRule.newBuilder() .setMatchingType(MatchingType.MATCHING_TYPE_FULL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedMatchList))) + .setDictionary( + Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedMatchList))) .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java index e0f836ee4f9..0fc065f07be 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java @@ -51,8 +51,9 @@ public static void main(String[] args) throws Exception { } // Inspects the provided text, avoiding matches specified in the exclusion list. - public static void inspectStringWithExclusionDictSubstring(String projectId, String textToInspect, - List excludedSubstringList) throws IOException { + public static void inspectStringWithExclusionDictSubstring( + String projectId, String textToInspect, List excludedSubstringList) + throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -68,8 +69,8 @@ public static void inspectStringWithExclusionDictSubstring(String projectId, Str // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. List infoTypes = new ArrayList<>(); - for (String typeName : new String[]{"EMAIL_ADDRESS", "DOMAIN_NAME", "PHONE_NUMBER", - "PERSON_NAME"}) { + for (String typeName : + new String[] {"EMAIL_ADDRESS", "DOMAIN_NAME", "PHONE_NUMBER", "PERSON_NAME"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } @@ -77,8 +78,9 @@ public static void inspectStringWithExclusionDictSubstring(String projectId, Str ExclusionRule exclusionRule = ExclusionRule.newBuilder() .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) - .setDictionary(Dictionary.newBuilder() - .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) + .setDictionary( + Dictionary.newBuilder() + .setWordList(WordList.newBuilder().addAllWords(excludedSubstringList))) .build(); // Construct a ruleset that applies the exclusion rule to the EMAIL_ADDRESSES infotype. diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java index a8a6d7dbaa4..f609a752986 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java @@ -49,8 +49,8 @@ public static void main(String[] args) throws Exception { } // Inspects the provided text, avoiding matches specified in the exclusion list. - public static void inspectStringWithExclusionRegex(String projectId, String textToInspect, - String excludedRegex) throws IOException { + public static void inspectStringWithExclusionRegex( + String projectId, String textToInspect, String excludedRegex) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. @@ -66,7 +66,7 @@ public static void inspectStringWithExclusionRegex(String projectId, String text // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. List infoTypes = new ArrayList<>(); - for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } @@ -113,4 +113,4 @@ public static void inspectStringWithExclusionRegex(String projectId, String text } } } -// [END dlp_inspect_string_with_exclusion_regex] \ No newline at end of file +// [END dlp_inspect_string_with_exclusion_regex] diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java index 85d9a5abff2..a1fc60e2226 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java @@ -67,7 +67,7 @@ public static void inspectStringWithoutOverlap(String projectId, String textToIn // Specify the type of info the inspection will look for. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types. List infoTypes = new ArrayList<>(); - for (String typeName : new String[]{"DOMAIN_NAME", "EMAIL_ADDRESS"}) { + for (String typeName : new String[] {"DOMAIN_NAME", "EMAIL_ADDRESS"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } @@ -81,8 +81,9 @@ public static void inspectStringWithoutOverlap(String projectId, String textToIn // Exclude EMAIL_ADDRESS matches ExclusionRule exclusionRule = ExclusionRule.newBuilder() - .setExcludeInfoTypes(ExcludeInfoTypes.newBuilder() - .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) + .setExcludeInfoTypes( + ExcludeInfoTypes.newBuilder() + .addInfoTypes(InfoType.newBuilder().setName("EMAIL_ADDRESS"))) .setMatchingType(MatchingType.MATCHING_TYPE_PARTIAL_MATCH) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java index c25488ff29b..ad015500fc4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java @@ -19,8 +19,6 @@ // [START dlp_inspect_table] import com.google.cloud.dlp.v2.DlpServiceClient; -import com.google.privacy.dlp.v2.ByteContentItem; -import com.google.privacy.dlp.v2.ByteContentItem.BytesType; import com.google.privacy.dlp.v2.ContentItem; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.Finding; @@ -28,28 +26,25 @@ import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.Likelihood; import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.Table; import com.google.privacy.dlp.v2.Table.Row; import com.google.privacy.dlp.v2.Value; -import com.google.protobuf.ByteString; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; public class InspectTable { public static void main(String[] args) throws Exception { // TODO(developer): Replace these variables before running the sample. String projectId = "your-project-id"; - Table tableToInspect = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("name").build()) - .addHeaders(FieldId.newBuilder().setName("phone").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("John Doe").build()) - .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) - .build(); + Table tableToInspect = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("name").build()) + .addHeaders(FieldId.newBuilder().setName("phone").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("John Doe").build()) + .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) + .build(); inspectTable(projectId, tableToInspect); } @@ -69,10 +64,7 @@ public static void inspectTable(String projectId, Table tableToInspect) { // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder() - .addInfoTypes(infoType) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addInfoTypes(infoType).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java index c83fb98423b..872ecd94356 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java @@ -58,16 +58,13 @@ public static void inspectTextFile(String projectId, String filePath) throws IOE // Specify the type of info the inspection will look for. List infoTypes = new ArrayList<>(); // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - for (String typeName : new String[]{"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { + for (String typeName : new String[] {"PHONE_NUMBER", "EMAIL_ADDRESS", "CREDIT_CARD_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } // Construct the configuration for the Inspect request. InspectConfig config = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .setIncludeQuote(true) - .build(); + InspectConfig.newBuilder().addAllInfoTypes(infoTypes).setIncludeQuote(true).build(); // Construct the Inspect request to be sent by the client. InspectContentRequest request = diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java index 5baf820ed29..16aba55c17b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java @@ -65,10 +65,7 @@ public static void inspectWithCustomRegex( // Construct the custom regex detector. InfoType infoType = InfoType.newBuilder().setName("C_MRN").build(); CustomInfoType customInfoType = - CustomInfoType.newBuilder() - .setInfoType(infoType) - .setRegex(regex) - .build(); + CustomInfoType.newBuilder().setInfoType(infoType).setRegex(regex).build(); // Construct the configuration for the Inspect request. InspectConfig config = @@ -81,7 +78,8 @@ public static void inspectWithCustomRegex( // Construct the Inspect request to be sent by the client. InspectContentRequest request = InspectContentRequest.newBuilder() - .setParent(LocationName.of(projectId, "global").toString()).setItem(item) + .setParent(LocationName.of(projectId, "global").toString()) + .setItem(item) .setInspectConfig(config) .build(); diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java index 6373698981d..2838d96dbc9 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java @@ -24,15 +24,9 @@ import com.google.privacy.dlp.v2.CryptoKey; import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; import com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet; -import com.google.privacy.dlp.v2.CustomInfoType; -import com.google.privacy.dlp.v2.CustomInfoType.SurrogateType; import com.google.privacy.dlp.v2.DeidentifyConfig; import com.google.privacy.dlp.v2.FieldId; import com.google.privacy.dlp.v2.FieldTransformation; -import com.google.privacy.dlp.v2.InfoType; -import com.google.privacy.dlp.v2.InfoTypeTransformations; -import com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; -import com.google.privacy.dlp.v2.InspectConfig; import com.google.privacy.dlp.v2.KmsWrappedCryptoKey; import com.google.privacy.dlp.v2.LocationName; import com.google.privacy.dlp.v2.PrimitiveTransformation; @@ -56,13 +50,14 @@ public static void main(String[] args) throws Exception { + "keyRings/YOUR_KEYRING_NAME/" + "cryptoKeys/YOUR_KEY_NAME"; String wrappedAesKey = "YOUR_ENCRYPTED_AES_256_KEY"; - Table tableToReIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) - .addRows( - Row.newBuilder().addValues( - Value.newBuilder().setStringValue("28777").build()) - .build()) - .build(); + Table tableToReIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("28777").build()) + .build()) + .build(); reIdentifyTableWithFpe(projectId, tableToReIdentify, kmsKeyName, wrappedAesKey); } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java index 5d574a4a242..a872ef79b3e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java @@ -83,7 +83,6 @@ static void redactImageFile(String projectId, String inputPath, String outputPat redacted.write(response.getRedactedImage().toByteArray()); redacted.close(); System.out.println("Redacted image written to " + outputPath); - } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java index fd412ce31db..3ed79863cc6 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java @@ -59,18 +59,21 @@ static void redactImageFileColoredInfoTypes(String projectId, String inputPath, // Define types of info to redact associate each one with a different color. // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types - ImageRedactionConfig ssnRedactionConfig = ImageRedactionConfig.newBuilder() - .setInfoType(InfoType.newBuilder().setName("US_SOCIAL_SECURITY_NUMBER").build()) - .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build()) - .build(); - ImageRedactionConfig emailRedactionConfig = ImageRedactionConfig.newBuilder() - .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS").build()) - .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build()) - .build(); - ImageRedactionConfig phoneRedactionConfig = ImageRedactionConfig.newBuilder() - .setInfoType(InfoType.newBuilder().setName("PHONE_NUMBER").build()) - .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build()) - .build(); + ImageRedactionConfig ssnRedactionConfig = + ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("US_SOCIAL_SECURITY_NUMBER").build()) + .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build()) + .build(); + ImageRedactionConfig emailRedactionConfig = + ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("EMAIL_ADDRESS").build()) + .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build()) + .build(); + ImageRedactionConfig phoneRedactionConfig = + ImageRedactionConfig.newBuilder() + .setInfoType(InfoType.newBuilder().setName("PHONE_NUMBER").build()) + .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build()) + .build(); // Create collection of all redact configurations. List imageRedactionConfigs = @@ -79,9 +82,10 @@ static void redactImageFileColoredInfoTypes(String projectId, String inputPath, // List types of info to search for. InspectConfig config = InspectConfig.newBuilder() - .addAllInfoTypes(imageRedactionConfigs.stream() - .map(ImageRedactionConfig::getInfoType) - .collect(Collectors.toList())) + .addAllInfoTypes( + imageRedactionConfigs.stream() + .map(ImageRedactionConfig::getInfoType) + .collect(Collectors.toList())) .build(); // Construct the Redact request to be sent by the client. @@ -101,7 +105,6 @@ static void redactImageFileColoredInfoTypes(String projectId, String inputPath, redacted.write(response.getRedactedImage().toByteArray()); redacted.close(); System.out.println("Redacted image written to " + outputPath); - } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java index 7c8c8c871c9..e7b909b3b64 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java @@ -63,15 +63,13 @@ static void redactImageFileListedInfoTypes(String projectId, String inputPath, S new String[] {"US_SOCIAL_SECURITY_NUMBER", "EMAIL_ADDRESS", "PHONE_NUMBER"}) { infoTypes.add(InfoType.newBuilder().setName(typeName).build()); } - InspectConfig inspectConfig = - InspectConfig.newBuilder() - .addAllInfoTypes(infoTypes) - .build(); + InspectConfig inspectConfig = InspectConfig.newBuilder().addAllInfoTypes(infoTypes).build(); // Prepare redaction configs. - List imageRedactionConfigs = infoTypes.stream() - .map(infoType -> ImageRedactionConfig.newBuilder().setInfoType(infoType).build()) - .collect(Collectors.toList()); + List imageRedactionConfigs = + infoTypes.stream() + .map(infoType -> ImageRedactionConfig.newBuilder().setInfoType(infoType).build()) + .collect(Collectors.toList()); // Construct the Redact request to be sent by the client. RedactImageRequest request = @@ -90,7 +88,6 @@ static void redactImageFileListedInfoTypes(String projectId, String inputPath, S redacted.write(response.getRedactedImage().toByteArray()); redacted.close(); System.out.println("Redacted image written to " + outputPath); - } } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 005e54d2152..601db01e537 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -20,6 +20,7 @@ import com.google.api.core.SettableApiFuture; import com.google.cloud.dlp.v2.DlpServiceClient; +import com.google.cloud.dlp.v2.DlpServiceSettings; import com.google.cloud.pubsub.v1.AckReplyConsumer; import com.google.cloud.pubsub.v1.MessageReceiver; import com.google.cloud.pubsub.v1.Subscriber; @@ -49,6 +50,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; +import org.threeten.bp.Duration; class RiskAnalysisLDiversity { @@ -69,7 +71,18 @@ public static void calculateLDiversity( // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. - try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) { + DlpServiceSettings.Builder dlpServiceSettingsBuilder = DlpServiceSettings.newBuilder(); + dlpServiceSettingsBuilder + .getDlpJobSettings() + .setRetrySettings( + dlpServiceSettingsBuilder + .getDlpJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(600)) + .build()); + try (DlpServiceClient dlpServiceClient = + DlpServiceClient.create(dlpServiceSettingsBuilder.build())) { // Specify the BigQuery table to analyze BigQueryTable bigQueryTable = BigQueryTable.newBuilder() diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index c326559e98a..3f4f7683335 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -37,9 +37,11 @@ public class DeIdentificationTests extends TestBase { @Override protected ImmutableList requiredEnvVars() { - return ImmutableList - .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "DLP_DEID_WRAPPED_KEY", - "DLP_DEID_KEY_NAME"); + return ImmutableList.of( + "GOOGLE_APPLICATION_CREDENTIALS", + "GOOGLE_CLOUD_PROJECT", + "DLP_DEID_WRAPPED_KEY", + "DLP_DEID_KEY_NAME"); } @Test @@ -79,10 +81,7 @@ public void testDeIdentifyTextWithFpe() throws IOException { @Test public void testReIdentifyTextWithFpe() throws IOException { ReIdentifyTextWithFpe.reIdentifyTextWithFpe( - PROJECT_ID, - "My phone number is PHONE_TOKEN(10):9617256398", - kmsKeyName, - wrappedKey); + PROJECT_ID, "My phone number is PHONE_TOKEN(10):9617256398", kmsKeyName, wrappedKey); String output = bout.toString(); assertThat(output).contains("Text after re-identification: "); @@ -90,26 +89,30 @@ public void testReIdentifyTextWithFpe() throws IOException { @Test public void testDeIdentifyTableWithFpe() throws IOException { - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) - .addHeaders(FieldId.newBuilder().setName("Date").build()) - .addHeaders(FieldId.newBuilder().setName("Compensation").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("11111").build()) - .addValues(Value.newBuilder().setStringValue("2015").build()) - .addValues(Value.newBuilder().setStringValue("$10").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("11111").build()) - .addValues(Value.newBuilder().setStringValue("2016").build()) - .addValues(Value.newBuilder().setStringValue("$20").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22222").build()) - .addValues(Value.newBuilder().setStringValue("2016").build()) - .addValues(Value.newBuilder().setStringValue("$15").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addHeaders(FieldId.newBuilder().setName("Date").build()) + .addHeaders(FieldId.newBuilder().setName("Compensation").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2015").build()) + .addValues(Value.newBuilder().setStringValue("$10").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("11111").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$20").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22222").build()) + .addValues(Value.newBuilder().setStringValue("2016").build()) + .addValues(Value.newBuilder().setStringValue("$15").build()) + .build()) + .build(); DeIdentifyTableWithFpe.deIdentifyTableWithFpe( PROJECT_ID, tableToDeIdentify, kmsKeyName, wrappedKey); @@ -120,11 +123,14 @@ public void testDeIdentifyTableWithFpe() throws IOException { @Test public void testReIdentifyTableWithFpe() throws IOException { - Table tableToReIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("28777").build()).build()) - .build(); + Table tableToReIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("Employee ID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("28777").build()) + .build()) + .build(); ReIdentifyTableWithFpe.reIdentifyTableWithFpe( PROJECT_ID, tableToReIdentify, kmsKeyName, wrappedKey); @@ -136,46 +142,54 @@ public void testReIdentifyTableWithFpe() throws IOException { @Test public void testDeIdentifyTableBucketing() throws IOException { // Transform a column based on the value of another column - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); - Table expectedTable = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("90:100").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("20:30").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("70:80").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("90:100").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("20:30").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("70:80").build()) + .build()) + .build(); Table table = DeIdentifyTableBucketing.deIdentifyTableBucketing(PROJECT_ID, tableToDeIdentify); @@ -187,49 +201,58 @@ public void testDeIdentifyTableBucketing() throws IOException { @Test public void testDeIdentifyTableConditionMasking() throws IOException { // Transform a column based on the value of another column - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); - Table expectedTable = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("**").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); - - Table table = DeIdentifyTableConditionMasking.deIdentifyTableConditionMasking( - PROJECT_ID, tableToDeIdentify); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("**").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + Table table = + DeIdentifyTableConditionMasking.deIdentifyTableConditionMasking( + PROJECT_ID, tableToDeIdentify); String output = bout.toString(); assertThat(output).contains("Table after de-identification:"); @@ -239,58 +262,77 @@ public void testDeIdentifyTableConditionMasking() throws IOException { @Test public void testDeIdentifyTableInfoTypes() throws IOException { // Transform findings found in column - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in Jane Austen's novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) - .build()) - .build(); - Table expectedTable = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "[PERSON_NAME] name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in [PERSON_NAME] novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("[PERSON_NAME] loved cats.").build()) - .build()) - .build(); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "Charles Dickens name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in Jane Austen's novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + Table expectedTable = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "[PERSON_NAME] name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in [PERSON_NAME] novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues( + Value.newBuilder().setStringValue("[PERSON_NAME] loved cats.").build()) + .build()) + .build(); Table table = DeIdentifyTableInfoTypes.deIdentifyTableInfoTypes(PROJECT_ID, tableToDeIdentify); @@ -302,44 +344,51 @@ public void testDeIdentifyTableInfoTypes() throws IOException { @Test public void testDeIdentifyTableRowSuppress() throws IOException { // Suppress a row based on the content of a column - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); - Table expectedTable = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .build()) - .build(); - - Table table = DeIdentifyTableRowSuppress.deIdentifyTableRowSuppress( - PROJECT_ID, tableToDeIdentify); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + Table expectedTable = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .build()) + .build(); + + Table table = + DeIdentifyTableRowSuppress.deIdentifyTableRowSuppress(PROJECT_ID, tableToDeIdentify); String output = bout.toString(); assertThat(output).contains("Table after de-identification:"); @@ -349,61 +398,80 @@ public void testDeIdentifyTableRowSuppress() throws IOException { @Test public void testDeIdentifyTableConditionsInfoTypes() throws IOException { // Transform findings only when specific conditions are met on another field - Table tableToDeIdentify = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "Charles Dickens name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in Jane Austen's novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) - .build()) - .build(); - Table expectedTable = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("AGE").build()) - .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) - .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) - .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("101").build()) - .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) - .addValues(Value.newBuilder().setStringValue("95").build()) - .addValues(Value.newBuilder().setStringValue( - "[PERSON_NAME] name was a curse, possibly invented by Shakespeare.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("22").build()) - .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) - .addValues(Value.newBuilder().setStringValue("21").build()) - .addValues(Value.newBuilder().setStringValue( - "There are 14 kisses in Jane Austen's novels.").build()) - .build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("55").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) - .addValues(Value.newBuilder().setStringValue("75").build()) - .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) - .build()) - .build(); - - Table table = DeIdentifyTableConditionInfoTypes.deIdentifyTableConditionInfoTypes( - PROJECT_ID, tableToDeIdentify); + Table tableToDeIdentify = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("Charles Dickens").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "Charles Dickens name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in Jane Austen's novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + Table expectedTable = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("AGE").build()) + .addHeaders(FieldId.newBuilder().setName("PATIENT").build()) + .addHeaders(FieldId.newBuilder().setName("HAPPINESS SCORE").build()) + .addHeaders(FieldId.newBuilder().setName("FACTOID").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("101").build()) + .addValues(Value.newBuilder().setStringValue("[PERSON_NAME]").build()) + .addValues(Value.newBuilder().setStringValue("95").build()) + .addValues( + Value.newBuilder() + .setStringValue( + "[PERSON_NAME] name was a curse invented by Shakespeare.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("22").build()) + .addValues(Value.newBuilder().setStringValue("Jane Austen").build()) + .addValues(Value.newBuilder().setStringValue("21").build()) + .addValues( + Value.newBuilder() + .setStringValue("There are 14 kisses in Jane Austen's novels.") + .build()) + .build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("55").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain").build()) + .addValues(Value.newBuilder().setStringValue("75").build()) + .addValues(Value.newBuilder().setStringValue("Mark Twain loved cats.").build()) + .build()) + .build(); + + Table table = + DeIdentifyTableConditionInfoTypes.deIdentifyTableConditionInfoTypes( + PROJECT_ID, tableToDeIdentify); String output = bout.toString(); assertThat(output).contains("Table after de-identification:"); @@ -428,34 +496,32 @@ public void testDeIdentifyWithDateShift() throws IOException { @Test public void testDeIdentifyWithRedaction() throws IOException { DeIdentifyWithRedaction.deIdentifyWithRedaction( - PROJECT_ID, - "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); + PROJECT_ID, "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); String output = bout.toString(); - assertThat(output).contains("Text after redaction: " - + "My name is Alicia Abernathy, and my email address is ."); + assertThat(output) + .contains( + "Text after redaction: " + "My name is Alicia Abernathy, and my email address is ."); } @Test public void testDeIdentifyWithReplacement() throws IOException { DeIdentifyWithReplacement.deIdentifyWithReplacement( - PROJECT_ID, - "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); + PROJECT_ID, "My name is Alicia Abernathy, and my email address is aabernathy@example.com."); String output = bout.toString(); - assertThat(output).contains("Text after redaction: " - + "My name is Alicia Abernathy, and my email address is [email-address]."); + assertThat(output) + .contains( + "Text after redaction: " + + "My name is Alicia Abernathy, and my email address is [email-address]."); } @Test public void testDeIdentifyWithInfoType() throws IOException { - DeIdentifyWithInfoType.deIdentifyWithInfoType( - PROJECT_ID, - "My email is test@example.com"); + DeIdentifyWithInfoType.deIdentifyWithInfoType(PROJECT_ID, "My email is test@example.com"); String output = bout.toString(); - assertThat(output).contains("Text after redaction: " - + "My email is [EMAIL_ADDRESS]"); + assertThat(output).contains("Text after redaction: " + "My email is [EMAIL_ADDRESS]"); } @Test diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 27662b5aa8b..65ad56e9893 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -46,18 +46,22 @@ public class InspectTests extends TestBase { private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; private UUID testRunUuid = UUID.randomUUID(); - private TopicName topicName = TopicName.of( - PROJECT_ID, - String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); - private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( - PROJECT_ID, - String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); + private TopicName topicName = + TopicName.of(PROJECT_ID, String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); + private ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of( + PROJECT_ID, String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); @Override protected ImmutableList requiredEnvVars() { - return ImmutableList - .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GCS_PATH", "PUB_SUB_TOPIC", - "PUB_SUB_SUBSCRIPTION", "BIGQUERY_DATASET", "BIGQUERY_TABLE"); + return ImmutableList.of( + "GOOGLE_APPLICATION_CREDENTIALS", + "GOOGLE_CLOUD_PROJECT", + "GCS_PATH", + "PUB_SUB_TOPIC", + "PUB_SUB_SUBSCRIPTION", + "BIGQUERY_DATASET", + "BIGQUERY_TABLE"); } @Before @@ -69,20 +73,18 @@ public void before() throws Exception { // Create a new subscription try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - subscriptionAdminClient - .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); + subscriptionAdminClient.createSubscription( + subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); } } - @After public void after() throws Exception { // Delete the test topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName); } catch (ApiException e) { - System.err.println(String.format("Error deleting topic %s: %s", - topicName.getTopic(), e)); + System.err.println(String.format("Error deleting topic %s: %s", topicName.getTopic(), e)); // Keep trying to clean up } @@ -90,8 +92,9 @@ public void after() throws Exception { try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { subscriptionAdminClient.deleteSubscription(subscriptionName); } catch (ApiException e) { - System.err.println(String.format("Error deleting subscription %s: %s", - subscriptionName.getSubscription(), e)); + System.err.println( + String.format( + "Error deleting subscription %s: %s", subscriptionName.getSubscription(), e)); // Keep trying to clean up } } @@ -123,7 +126,8 @@ public void testInspectWithCustomRegex() throws Exception { @Test public void testInspectStringWithExclusionDict() throws Exception { - InspectStringWithExclusionDict.inspectStringWithExclusionDict(PROJECT_ID, + InspectStringWithExclusionDict.inspectStringWithExclusionDict( + PROJECT_ID, "Some email addresses: gary@example.com, example@example.com", Arrays.asList("example@example.com")); @@ -134,7 +138,8 @@ public void testInspectStringWithExclusionDict() throws Exception { @Test public void testInspectStringWithExclusionDictSubstring() throws Exception { - InspectStringWithExclusionDictSubstring.inspectStringWithExclusionDictSubstring(PROJECT_ID, + InspectStringWithExclusionDictSubstring.inspectStringWithExclusionDictSubstring( + PROJECT_ID, "Some email addresses: gary@example.com, TEST@example.com", Arrays.asList("TEST")); @@ -145,9 +150,8 @@ public void testInspectStringWithExclusionDictSubstring() throws Exception { @Test public void testInspectStringWithExclusionRegex() throws Exception { - InspectStringWithExclusionRegex.inspectStringWithExclusionRegex(PROJECT_ID, - "Some email addresses: gary@example.com, bob@example.org", - ".+@example.com"); + InspectStringWithExclusionRegex.inspectStringWithExclusionRegex( + PROJECT_ID, "Some email addresses: gary@example.com, bob@example.org", ".+@example.com"); String output = bout.toString(); assertThat(output).contains("bob@example.org"); @@ -156,7 +160,8 @@ public void testInspectStringWithExclusionRegex() throws Exception { @Test public void testInspectStringCustomExcludingSubstring() throws Exception { - InspectStringCustomExcludingSubstring.inspectStringCustomExcludingSubstring(PROJECT_ID, + InspectStringCustomExcludingSubstring.inspectStringCustomExcludingSubstring( + PROJECT_ID, "Name: Doe, John. Name: Example, Jimmy", "[A-Z][a-z]{1,15}, [A-Z][a-z]{1,15}", Arrays.asList("Jimmy")); @@ -168,8 +173,8 @@ public void testInspectStringCustomExcludingSubstring() throws Exception { @Test public void testInspectStringCustomOmitOverlap() throws Exception { - InspectStringCustomOmitOverlap.inspectStringCustomOmitOverlap(PROJECT_ID, - "Name: Jane Doe. Name: Larry Page."); + InspectStringCustomOmitOverlap.inspectStringCustomOmitOverlap( + PROJECT_ID, "Name: Jane Doe. Name: Larry Page."); String output = bout.toString(); assertThat(output).contains("Jane Doe"); @@ -187,8 +192,8 @@ public void testInspectStringOmitOverlap() throws Exception { @Test public void testInspectStringWithoutOverlap() throws Exception { - InspectStringWithoutOverlap.inspectStringWithoutOverlap(PROJECT_ID, - "example.com is a domain, james@example.org is an email."); + InspectStringWithoutOverlap.inspectStringWithoutOverlap( + PROJECT_ID, "example.com is a domain, james@example.org is an email."); String output = bout.toString(); assertThat(output).contains("example.com"); @@ -197,13 +202,15 @@ public void testInspectStringWithoutOverlap() throws Exception { @Test public void testInspectTable() { - Table tableToInspect = Table.newBuilder() - .addHeaders(FieldId.newBuilder().setName("name").build()) - .addHeaders(FieldId.newBuilder().setName("phone").build()) - .addRows(Row.newBuilder() - .addValues(Value.newBuilder().setStringValue("John Doe").build()) - .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) - .build(); + Table tableToInspect = + Table.newBuilder() + .addHeaders(FieldId.newBuilder().setName("name").build()) + .addHeaders(FieldId.newBuilder().setName("phone").build()) + .addRows( + Row.newBuilder() + .addValues(Value.newBuilder().setStringValue("John Doe").build()) + .addValues(Value.newBuilder().setStringValue("(206) 555-0123").build())) + .build(); InspectTable.inspectTable(PROJECT_ID, tableToInspect); String output = bout.toString(); @@ -212,8 +219,8 @@ public void testInspectTable() { @Test public void testInspectStringCustomHotword() throws Exception { - InspectStringCustomHotword.inspectStringCustomHotword(PROJECT_ID, - "patient name: John Doe", "patient"); + InspectStringCustomHotword.inspectStringCustomHotword( + PROJECT_ID, "patient name: John Doe", "patient"); String output = bout.toString(); assertThat(output).contains("John Doe"); @@ -221,8 +228,7 @@ public void testInspectStringCustomHotword() throws Exception { @Test public void testInspectStringCustomHotwordNegativeExample() throws Exception { - InspectStringCustomHotword.inspectStringCustomHotword(PROJECT_ID, - "name: John Doe", "patient"); + InspectStringCustomHotword.inspectStringCustomHotword(PROJECT_ID, "name: John Doe", "patient"); String output = bout.toString(); assertThat(output).doesNotContain("John Doe"); @@ -230,8 +236,7 @@ public void testInspectStringCustomHotwordNegativeExample() throws Exception { @Test public void testInspectStringMultipleRulesPatientRule() throws Exception { - InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, - "patient name: Jane Doe"); + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, "patient name: Jane Doe"); String output = bout.toString(); assertThat(output).contains("LIKELY"); @@ -239,8 +244,7 @@ public void testInspectStringMultipleRulesPatientRule() throws Exception { @Test public void testInspectStringMultipleRulesDoctorRule() throws Exception { - InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, - "doctor: Jane Doe"); + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, "doctor: Jane Doe"); String output = bout.toString(); assertThat(output).contains("Findings: 0"); @@ -248,8 +252,7 @@ public void testInspectStringMultipleRulesDoctorRule() throws Exception { @Test public void testInspectStringMultipleRulesQuasimodoRule() throws Exception { - InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, - "patient: Quasimodo"); + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, "patient: Quasimodo"); String output = bout.toString(); assertThat(output).contains("Findings: 0"); @@ -257,8 +260,7 @@ public void testInspectStringMultipleRulesQuasimodoRule() throws Exception { @Test public void testInspectStringMultipleRulesRedactedRule() throws Exception { - InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, - "name of patient: REDACTED"); + InspectStringMultipleRules.inspectStringMultipleRules(PROJECT_ID, "name of patient: REDACTED"); String output = bout.toString(); assertThat(output).contains("Findings: 0"); @@ -304,9 +306,8 @@ public void testRedactImageListedInfoTypes() throws Exception { @Test public void testInspectGcsFile() throws Exception { - InspectGcsFile - .inspectGcsFile(PROJECT_ID, GCS_PATH, topicName.getTopic(), - subscriptionName.getSubscription()); + InspectGcsFile.inspectGcsFile( + PROJECT_ID, GCS_PATH, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Job status: DONE"); @@ -314,9 +315,8 @@ public void testInspectGcsFile() throws Exception { @Test public void testInspectGcsFileWithSampling() throws Exception { - InspectGcsFileWithSampling - .inspectGcsFileWithSampling(PROJECT_ID, GCS_PATH, topicName.getTopic(), - subscriptionName.getSubscription()); + InspectGcsFileWithSampling.inspectGcsFileWithSampling( + PROJECT_ID, GCS_PATH, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Job status: DONE"); @@ -324,9 +324,12 @@ public void testInspectGcsFileWithSampling() throws Exception { @Test public void testInspectDatastoreEntity() throws Exception { - InspectDatastoreEntity - .insepctDatastoreEntity(PROJECT_ID, datastoreNamespace, datastoreKind, topicName.getTopic(), - subscriptionName.getSubscription()); + InspectDatastoreEntity.insepctDatastoreEntity( + PROJECT_ID, + datastoreNamespace, + datastoreKind, + topicName.getTopic(), + subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Job status: DONE"); @@ -334,9 +337,8 @@ public void testInspectDatastoreEntity() throws Exception { @Test public void testInspectBigQueryTable() throws Exception { - InspectBigQueryTable - .inspectBigQueryTable(PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), - subscriptionName.getSubscription()); + InspectBigQueryTable.inspectBigQueryTable( + PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Job status: DONE"); @@ -344,9 +346,8 @@ public void testInspectBigQueryTable() throws Exception { @Test public void testInspectBigQueryTableWithSampling() throws Exception { - InspectBigQueryTableWithSampling - .inspectBigQueryTableWithSampling(PROJECT_ID, topicName.getTopic(), - subscriptionName.getSubscription()); + InspectBigQueryTableWithSampling.inspectBigQueryTableWithSampling( + PROJECT_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Job status: DONE"); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java index 73015928cd7..13c0386e340 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java @@ -32,10 +32,8 @@ public class RedactTests extends TestBase { private static final String SIMPLE_INPUT_FILE = "src/test/resources/test.png"; private static final String SIMPLE_OUTPUT_FILE = "redacted.png"; - private static final String DOCUMENT_INPUT_FILE = - "src/test/resources/sensitive-data-image.jpg"; - private static final String DOCUMENT_OUTPUT_FILE = - "sensitive-data-image-redacted.jpg"; + private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; + private static final String DOCUMENT_OUTPUT_FILE = "sensitive-data-image-redacted.jpg"; @Override protected ImmutableList requiredEnvVars() { @@ -58,8 +56,8 @@ public void testRedactImage() throws Exception { @Test public void testRedactImageAllInfoTypes() throws Exception { - RedactImageFileAllInfoTypes.redactImageFileAllInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, - DOCUMENT_OUTPUT_FILE); + RedactImageFileAllInfoTypes.redactImageFileAllInfoTypes( + PROJECT_ID, DOCUMENT_INPUT_FILE, DOCUMENT_OUTPUT_FILE); String output = bout.toString(); assertThat(output).contains("Redacted image written"); @@ -67,8 +65,8 @@ public void testRedactImageAllInfoTypes() throws Exception { @Test public void testRedactImageListedInfoTypes() throws Exception { - RedactImageFileListedInfoTypes.redactImageFileListedInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, - DOCUMENT_OUTPUT_FILE); + RedactImageFileListedInfoTypes.redactImageFileListedInfoTypes( + PROJECT_ID, DOCUMENT_INPUT_FILE, DOCUMENT_OUTPUT_FILE); String output = bout.toString(); assertThat(output).contains("Redacted image written"); @@ -76,8 +74,8 @@ public void testRedactImageListedInfoTypes() throws Exception { @Test public void testRedactImageColoredInfoTypes() throws Exception { - RedactImageFileColoredInfoTypes.redactImageFileColoredInfoTypes(PROJECT_ID, DOCUMENT_INPUT_FILE, - DOCUMENT_OUTPUT_FILE); + RedactImageFileColoredInfoTypes.redactImageFileColoredInfoTypes( + PROJECT_ID, DOCUMENT_INPUT_FILE, DOCUMENT_OUTPUT_FILE); String output = bout.toString(); assertThat(output).contains("Redacted image written"); @@ -85,8 +83,8 @@ public void testRedactImageColoredInfoTypes() throws Exception { @Test public void testRedactImageAllText() throws Exception { - RedactImageFileAllText.redactImageFileAllText(PROJECT_ID, DOCUMENT_INPUT_FILE, - DOCUMENT_OUTPUT_FILE); + RedactImageFileAllText.redactImageFileAllText( + PROJECT_ID, DOCUMENT_INPUT_FILE, DOCUMENT_OUTPUT_FILE); String output = bout.toString(); assertThat(output).contains("Redacted image written"); diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index de2091998f1..971955711bd 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -36,18 +36,21 @@ public class RiskAnalysisTests extends TestBase { private UUID testRunUuid = UUID.randomUUID(); - private TopicName topicName = TopicName.of( - PROJECT_ID, - String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); - private ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( - PROJECT_ID, - String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); + private TopicName topicName = + TopicName.of(PROJECT_ID, String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); + private ProjectSubscriptionName subscriptionName = + ProjectSubscriptionName.of( + PROJECT_ID, String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); @Override protected ImmutableList requiredEnvVars() { - return ImmutableList - .of("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "PUB_SUB_TOPIC", - "PUB_SUB_SUBSCRIPTION", "BIGQUERY_DATASET", "BIGQUERY_TABLE"); + return ImmutableList.of( + "GOOGLE_APPLICATION_CREDENTIALS", + "GOOGLE_CLOUD_PROJECT", + "PUB_SUB_TOPIC", + "PUB_SUB_SUBSCRIPTION", + "BIGQUERY_DATASET", + "BIGQUERY_TABLE"); } @Before @@ -58,8 +61,8 @@ public void before() throws Exception { } // Create a new subscription try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { - subscriptionAdminClient - .createSubscription(subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); + subscriptionAdminClient.createSubscription( + subscriptionName, topicName, PushConfig.getDefaultInstance(), 0); } } @@ -69,8 +72,7 @@ public void after() throws Exception { try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName); } catch (ApiException e) { - System.err.println(String.format("Error deleting topic %s: %s", - topicName.getTopic(), e)); + System.err.println(String.format("Error deleting topic %s: %s", topicName.getTopic(), e)); // Keep trying to clean up } @@ -78,8 +80,9 @@ public void after() throws Exception { try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { subscriptionAdminClient.deleteSubscription(subscriptionName); } catch (ApiException e) { - System.err.println(String.format("Error deleting subscription %s: %s", - subscriptionName.getSubscription(), e)); + System.err.println( + String.format( + "Error deleting subscription %s: %s", subscriptionName.getSubscription(), e)); // Keep trying to clean up } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java index 40007d31e51..58ed908bb1e 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java @@ -24,9 +24,7 @@ import org.junit.After; import org.junit.Before; -/** - * Common base class for DLP snippet tests - */ +/** Common base class for DLP snippet tests */ abstract class TestBase { protected static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); @@ -45,8 +43,9 @@ abstract class TestBase { private static void requireEnvVar(String varName) { assertWithMessage( - String.format("Environment variable '%s' must be set to perform these tests.", varName)) - .that(System.getenv(varName)).isNotEmpty(); + String.format("Environment variable '%s' must be set to perform these tests.", varName)) + .that(System.getenv(varName)) + .isNotEmpty(); } @Before From cf0544c81f30f1388e4883660acdd8154e964800 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Sep 2020 20:56:45 +0200 Subject: [PATCH 109/406] chore(deps): update dependency com.google.cloud:libraries-bom to v11 --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 10003c9d783..91924b49f4d 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import From 2b1c178a51cd8f9d4d44132cdb9fc2e2a47f5f7e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 7 Oct 2020 00:08:09 +0200 Subject: [PATCH 110/406] chore(deps): update dependency com.google.cloud:libraries-bom to v12 (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `11.0.0` -> `12.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 91924b49f4d..e378b965045 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.0.0 + 12.0.0 pom import From 3e63072b38482d710db6db049bf98aadf0a0007b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 18:56:02 +0200 Subject: [PATCH 111/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.21 (#291) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](com/google/cloud/samples/shared-configuration) | patch | `1.0.18` -> `1.0.21` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3913e54cf04..04f23e77492 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 86ec641f3d7..82adf24d70b 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 972246d7268..6f294594e48 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index e378b965045..0f17a41dd34 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 From 0f7593b466f0c219c7804bc5104ab4256386a60e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 15 Oct 2020 23:05:00 +0200 Subject: [PATCH 112/406] test(deps): update dependency junit:junit to v4.13.1 (#301) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 04f23e77492..ac1456f5ee4 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -41,7 +41,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6f294594e48..d8812badd4a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -40,7 +40,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0f17a41dd34..c23798b84d5 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -50,7 +50,7 @@ junit junit - 4.13 + 4.13.1 test From 282c07682dd27b414f607f3e0f7e4bc99f9a1658 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 00:46:37 +0200 Subject: [PATCH 113/406] chore(deps): update dependency com.google.cloud:libraries-bom to v12.1.0 (#309) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `12.0.0` -> `12.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index c23798b84d5..7f977cf9f86 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From 972adbe4ba990a6d20195df663ff52fb79289cc2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 00:54:19 +0200 Subject: [PATCH 114/406] chore(deps): update dependency com.google.cloud:libraries-bom to v13 (#318) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `12.1.0` -> `13.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7f977cf9f86..7b7473917ae 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.1.0 + 13.0.0 pom import From c578c32444107941751a02d28d9d4c827315a9ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 20:30:09 +0200 Subject: [PATCH 115/406] chore(deps): update dependency com.google.cloud:libraries-bom to v13.1.0 (#321) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.0.0` -> `13.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7b7473917ae..451a6df4ce4 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.0.0 + 13.1.0 pom import From 20e20821e3e9ea5c02395d32f8d6f28ae54e06e3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Oct 2020 21:36:53 +0200 Subject: [PATCH 116/406] test(deps): update dependency com.google.truth:truth to v1.1 (#319) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.truth:truth](com/google/truth/truth) | minor | `1.0.1` -> `1.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index ac1456f5ee4..95894485309 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -47,7 +47,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d8812badd4a..ae0cfcf3a5f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -46,7 +46,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 451a6df4ce4..7290b1336d1 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -56,7 +56,7 @@ com.google.truth truth - 1.0.1 + 1.1 test From d787315b7dc03b187e21a239ad8851122628cbf0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 23 Oct 2020 19:58:24 +0200 Subject: [PATCH 117/406] chore(deps): update dependency com.google.cloud:libraries-bom to v13.2.0 (#324) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.1.0` -> `13.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7290b1336d1..4326a70edd3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.1.0 + 13.2.0 pom import From 68740ef90fd8ddc71fd8dcd3c5b87e7e530c27e5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Oct 2020 00:58:13 +0100 Subject: [PATCH 118/406] chore(deps): update dependency com.google.cloud:libraries-bom to v13.3.0 (#325) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.2.0` -> `13.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 4326a70edd3..557911db3c6 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.2.0 + 13.3.0 pom import From 42fdd0f8b2da36cf9b475794d024fe5499b10ed6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 31 Oct 2020 00:34:23 +0100 Subject: [PATCH 119/406] chore(deps): update dependency com.google.cloud:libraries-bom to v13.4.0 (#328) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.3.0` -> `13.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 557911db3c6..90d0a46bbac 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.3.0 + 13.4.0 pom import From 6fedf39561a3ef21576591eea7aa1c1771be45f7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 31 Oct 2020 01:04:08 +0100 Subject: [PATCH 120/406] samples(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.108.6 (#296) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 95894485309..8de9c31ff37 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.108.1 + 1.108.6 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ae0cfcf3a5f..51cd7008552 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.108.1 + 1.108.6 junit From 082eaec44bfc9f3f772b66c6fb23d980e8bba117 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 00:12:10 +0000 Subject: [PATCH 121/406] chore: release 2.2.0 (#311) :robot: I have created a release \*beep\* \*boop\* --- ## [2.2.0](https://www.github.com/googleapis/java-dlp/compare/v2.1.0...v2.2.0) (2020-10-31) ### Features * retrieve job config for risk analysis jobs. docs: clarify timespan config for BigQuery and Datastore ([#302](https://www.github.com/googleapis/java-dlp/issues/302)) ([58d12e2](https://www.github.com/googleapis/java-dlp/commit/58d12e261665c5beee897b71498b8c2a980e81ba)) ### Bug Fixes * flaky testInspectStringMultipleRulesPatientRule ([#264](https://www.github.com/googleapis/java-dlp/issues/264)) ([f8dda41](https://www.github.com/googleapis/java-dlp/commit/f8dda413972df0e348440ffd76d453536731c2bd)) ### Documentation * correct the links for parent fields ([#274](https://www.github.com/googleapis/java-dlp/issues/274)) ([44e6c76](https://www.github.com/googleapis/java-dlp/commit/44e6c769f536b6333cc1535329c503e4051e0445)) * expand parent field format, and BigQuery sampling options. Also describing which transformations are allowed for ReidentifyContent API calls, and the custom alphabet allowed for format-preserving encryption (FPE). ([#266](https://www.github.com/googleapis/java-dlp/issues/266)) ([9a10739](https://www.github.com/googleapis/java-dlp/commit/9a10739284127974c669bd3580ebe29a8f8316a4)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#287](https://www.github.com/googleapis/java-dlp/issues/287)) ([680692f](https://www.github.com/googleapis/java-dlp/commit/680692f82f84249467767e75dcfe00457a98351d)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#298](https://www.github.com/googleapis/java-dlp/issues/298)) ([4bf3dc4](https://www.github.com/googleapis/java-dlp/commit/4bf3dc4b29c1d937eeaf72418e19ce9adbe631d5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#315](https://www.github.com/googleapis/java-dlp/issues/315)) ([b00c1a3](https://www.github.com/googleapis/java-dlp/commit/b00c1a312bfef30f831f2b1d3c9b063cb9dba8d5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#320](https://www.github.com/googleapis/java-dlp/issues/320)) ([a836cbd](https://www.github.com/googleapis/java-dlp/commit/a836cbd9057f363d9e5129c1be847ad35723209f)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.9.0 ([#263](https://www.github.com/googleapis/java-dlp/issues/263)) ([56feeb2](https://www.github.com/googleapis/java-dlp/commit/56feeb23faf5fafebeadf98a8a75ac4b64630336)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 51cd7008552..3b3e5e53023 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.1.1-SNAPSHOT + 2.2.0 From 1ad6c47f131674f769d77d98ce62322270c20b58 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 08:10:03 +0000 Subject: [PATCH 122/406] chore: release 2.2.1-SNAPSHOT (#333) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 3b3e5e53023..13096df662b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.0 + 2.2.1-SNAPSHOT From 0a0af29771e927b20d287883336eb893639f5a5c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 16:18:11 +0000 Subject: [PATCH 123/406] chore: release 2.2.1 (#335) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.1](https://www.github.com/googleapis/java-dlp/compare/v2.2.0...v2.2.1) (2020-10-31) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#332](https://www.github.com/googleapis/java-dlp/issues/332)) ([7dd78c4](https://www.github.com/googleapis/java-dlp/commit/7dd78c4b65b8948a9a9e3158c44c44f3617d5f25)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 13096df662b..cfb3b1ee948 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.1-SNAPSHOT + 2.2.1 From ed06cc7dac9a1caf32ee96f0f4e0e38446421b6d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 09:10:03 +0000 Subject: [PATCH 124/406] chore: release 2.2.2-SNAPSHOT (#337) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index cfb3b1ee948..4b0d67e2def 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.1 + 2.2.2-SNAPSHOT From 331913e2123634d59c844d2666d2306636be9a3e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 2 Nov 2020 19:18:14 +0100 Subject: [PATCH 125/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.0 (#331) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | minor | `2.1.0` -> `2.2.0` | --- ### Release Notes

googleapis/java-dlp ### [`v2.2.0`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​220-httpswwwgithubcomgoogleapisjava-dlpcomparev210v220-2020-10-31) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.1.0...v2.2.0) ##### Features - retrieve job config for risk analysis jobs. docs: clarify timespan config for BigQuery and Datastore ([#​302](https://www.github.com/googleapis/java-dlp/issues/302)) ([58d12e2](https://www.github.com/googleapis/java-dlp/commit/58d12e261665c5beee897b71498b8c2a980e81ba)) ##### Bug Fixes - flaky testInspectStringMultipleRulesPatientRule ([#​264](https://www.github.com/googleapis/java-dlp/issues/264)) ([f8dda41](https://www.github.com/googleapis/java-dlp/commit/f8dda413972df0e348440ffd76d453536731c2bd)) ##### Documentation - correct the links for parent fields ([#​274](https://www.github.com/googleapis/java-dlp/issues/274)) ([44e6c76](https://www.github.com/googleapis/java-dlp/commit/44e6c769f536b6333cc1535329c503e4051e0445)) - expand parent field format, and BigQuery sampling options. Also describing which transformations are allowed for ReidentifyContent API calls, and the custom alphabet allowed for format-preserving encryption (FPE). ([#​266](https://www.github.com/googleapis/java-dlp/issues/266)) ([9a10739](https://www.github.com/googleapis/java-dlp/commit/9a10739284127974c669bd3580ebe29a8f8316a4)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#​287](https://www.github.com/googleapis/java-dlp/issues/287)) ([680692f](https://www.github.com/googleapis/java-dlp/commit/680692f82f84249467767e75dcfe00457a98351d)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#​298](https://www.github.com/googleapis/java-dlp/issues/298)) ([4bf3dc4](https://www.github.com/googleapis/java-dlp/commit/4bf3dc4b29c1d937eeaf72418e19ce9adbe631d5)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#​315](https://www.github.com/googleapis/java-dlp/issues/315)) ([b00c1a3](https://www.github.com/googleapis/java-dlp/commit/b00c1a312bfef30f831f2b1d3c9b063cb9dba8d5)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#​320](https://www.github.com/googleapis/java-dlp/issues/320)) ([a836cbd](https://www.github.com/googleapis/java-dlp/commit/a836cbd9057f363d9e5129c1be847ad35723209f)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.9.0 ([#​263](https://www.github.com/googleapis/java-dlp/issues/263)) ([56feeb2](https://www.github.com/googleapis/java-dlp/commit/56feeb23faf5fafebeadf98a8a75ac4b64630336))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 8de9c31ff37..16adcd24c92 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.1.0 + 2.2.0 From 56a64da4413f7089a3ca39f9a3c17a1735af9317 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 2 Nov 2020 22:09:56 +0100 Subject: [PATCH 126/406] samples(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.108.7 (#339) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 16adcd24c92..3f6ebad60fd 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.108.6 + 1.108.7 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4b0d67e2def..496cbc5b5c5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.108.6 + 1.108.7 junit From caf3d6b434295b72ce369a7e700745db3bae3bd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 Nov 2020 01:26:17 +0100 Subject: [PATCH 127/406] chore(deps): update dependency com.google.cloud:libraries-bom to v14 (#340) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `13.4.0` -> `14.4.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 90d0a46bbac..3075ecaccdc 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.4.0 + 14.4.1 pom import From 8c6effb6159aba06027ed925fea9cbb9244746ae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 Nov 2020 00:02:08 +0100 Subject: [PATCH 128/406] chore(deps): update dependency com.google.cloud:libraries-bom to v15 (#342) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `14.4.1` -> `15.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 3075ecaccdc..7c4f5ebf986 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 14.4.1 + 15.0.0 pom import From 881e4f5388aadef10dc37d817cd38301d448447e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 17 Nov 2020 19:31:23 +0100 Subject: [PATCH 129/406] chore(deps): update dependency com.google.cloud:libraries-bom to v15.1.0 (#348) --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7c4f5ebf986..f90a7140129 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 15.0.0 + 15.1.0 pom import From 69b7bdeb6291f3c6015befb162a82d0112e43842 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 18:38:02 +0000 Subject: [PATCH 130/406] chore: release 2.2.2 (#351) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.2](https://www.github.com/googleapis/java-dlp/compare/v2.2.1...v2.2.2) (2020-11-17) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.15.0 ([#346](https://www.github.com/googleapis/java-dlp/issues/346)) ([3acd318](https://www.github.com/googleapis/java-dlp/commit/3acd318e84ac13a44a2c53d171e129857c4ea51b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 496cbc5b5c5..273f86d58ed 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.2-SNAPSHOT + 2.2.2 From 86b9e9adb559983907072b0c250c043f80934569 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2020 09:10:13 +0000 Subject: [PATCH 131/406] chore: release 2.2.3-SNAPSHOT (#357) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 273f86d58ed..3797af4b166 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.2 + 2.2.3-SNAPSHOT From b43e599f69daa4b335127b0e763d1385b32982aa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 18:00:38 +0100 Subject: [PATCH 132/406] chore(deps): update dependency com.google.cloud:libraries-bom to v16 (#355) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `15.1.0` -> `16.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index f90a7140129..5fe781ba01e 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 15.1.0 + 16.1.0 pom import From efc41ac32b7d05ce2c7b3db330365f5f3df94e4c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 18:40:27 +0100 Subject: [PATCH 133/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.2 (#353) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | patch | `2.2.0` -> `2.2.2` | --- ### Release Notes
googleapis/java-dlp ### [`v2.2.2`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​222-httpswwwgithubcomgoogleapisjava-dlpcomparev221v222-2020-11-17) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.0...v2.2.2)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3f6ebad60fd..cd5a28722ff 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.0 + 2.2.2 From c302d77a5917c6536e694648a30d5490ff3d6a6f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 23:50:06 +0000 Subject: [PATCH 134/406] chore: release 2.2.3 (#366) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.3](https://www.github.com/googleapis/java-dlp/compare/v2.2.2...v2.2.3) (2020-12-08) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#365](https://www.github.com/googleapis/java-dlp/issues/365)) ([1156bc7](https://www.github.com/googleapis/java-dlp/commit/1156bc7d0a203f6110d007727834358b1a48a8ea)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 3797af4b166..c4a18f44610 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.3-SNAPSHOT + 2.2.3 From 48c75eb1d21c566f3e242a030d6154a38c351558 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:10:08 +0000 Subject: [PATCH 135/406] chore: release 2.2.4-SNAPSHOT (#371) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c4a18f44610..f40a490b017 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.3 + 2.2.4-SNAPSHOT From 52a1b542af781debdf2fd54626b2371e4842cfd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Dec 2020 20:54:34 +0100 Subject: [PATCH 136/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.3 (#370) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | patch | `2.2.2` -> `2.2.3` | --- ### Release Notes
googleapis/java-dlp ### [`v2.2.3`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​223-httpswwwgithubcomgoogleapisjava-dlpcomparev222v223-2020-12-08) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.2...v2.2.3)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index cd5a28722ff..048da65e070 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.2 + 2.2.3 From e8fb2f1f7195fee55facf4d933bd945d72ea7abd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 14 Dec 2020 22:20:14 +0000 Subject: [PATCH 137/406] chore: release 2.2.4 (#378) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.4](https://www.github.com/googleapis/java-dlp/compare/v2.2.3...v2.2.4) (2020-12-14) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([#376](https://www.github.com/googleapis/java-dlp/issues/376)) ([163bb4e](https://www.github.com/googleapis/java-dlp/commit/163bb4e6447513aa6d3df681fa074b7ac3c05e6f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f40a490b017..1b2048c0d2a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.4-SNAPSHOT + 2.2.4 From 9e810019c58e2bebe2ed10e809a970bad94037af Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 15 Dec 2020 09:14:03 +0000 Subject: [PATCH 138/406] chore: release 2.2.5-SNAPSHOT (#379) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 1b2048c0d2a..9f7652aef61 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.4 + 2.2.5-SNAPSHOT From b0d8c478f0cfd88066e0d2c25090642434473c00 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 23:30:34 +0100 Subject: [PATCH 139/406] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.0 (#383) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `16.1.0` -> `16.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 5fe781ba01e..1daedb4a9f8 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.1.0 + 16.2.0 pom import From eb1ced43728264d6c0639e1e637e8747852a0909 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 16 Dec 2020 18:33:05 +0100 Subject: [PATCH 140/406] samples(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.110.1 (#354) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 048da65e070..039e7566af6 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.108.7 + 1.110.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9f7652aef61..92831d46995 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.108.7 + 1.110.1 junit From 82d1d2e8844e837043264d9eef59359efa9a88ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Jan 2021 22:50:33 +0100 Subject: [PATCH 141/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.4 (#385) --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 039e7566af6..2d5c1cc3698 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.3 + 2.2.4 From 9f449246888f81ccbc421425c37607d789b4570e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Jan 2021 22:50:47 +0100 Subject: [PATCH 142/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.110.3 (#390) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 2d5c1cc3698..0180f8c0947 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.110.1 + 1.110.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 92831d46995..41e0b02a05b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.110.1 + 1.110.3 junit From 2ba9079327bb20bc26481c9dc76d6295066b22a9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 6 Jan 2021 23:04:12 +0000 Subject: [PATCH 143/406] chore: release 2.2.5 (#382) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.5](https://www.github.com/googleapis/java-dlp/compare/v2.2.4...v2.2.5) (2021-01-06) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.110.3 ([#390](https://www.github.com/googleapis/java-dlp/issues/390)) ([76b67ec](https://www.github.com/googleapis/java-dlp/commit/76b67ecdb1a95979399a496a536f10f91a1aebc3)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#381](https://www.github.com/googleapis/java-dlp/issues/381)) ([e064751](https://www.github.com/googleapis/java-dlp/commit/e0647511d3cc143936d5f33df2b254c93d039540)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 41e0b02a05b..8b21fce26c0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.5-SNAPSHOT + 2.2.5 From e453ff8422996b37e1f755134d0666594af31042 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Jan 2021 09:08:02 +0000 Subject: [PATCH 144/406] chore: release 2.2.6-SNAPSHOT (#394) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 8b21fce26c0..6a118ad3fcf 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.5 + 2.2.6-SNAPSHOT From cbfd7bb36f2e2ae9b3844d634577189ae3374ac3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jan 2021 22:30:10 +0100 Subject: [PATCH 145/406] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.1 (#393) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `16.2.0` -> `16.2.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 1daedb4a9f8..d4401800508 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.0 + 16.2.1 pom import From f9bc2d397ae7f629cf9093c24acad702bcdfcca5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jan 2021 22:43:33 +0100 Subject: [PATCH 146/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.5 (#392) --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0180f8c0947..f68e3fd5f0e 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.4 + 2.2.5 From 1eeac390d967a59af4a14fb6480d9f04b4525534 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 01:18:03 +0000 Subject: [PATCH 147/406] chore: release 2.2.6 (#400) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.6](https://www.github.com/googleapis/java-dlp/compare/v2.2.5...v2.2.6) (2021-01-14) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#399](https://www.github.com/googleapis/java-dlp/issues/399)) ([9761941](https://www.github.com/googleapis/java-dlp/commit/97619410a08a2b3cecc38f2aa650164ef6f4a696)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6a118ad3fcf..4f8a09455da 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.6-SNAPSHOT + 2.2.6 From cf7d39348cc3fa52153a25abf84a3ba2dfe41254 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 09:12:16 +0000 Subject: [PATCH 148/406] chore: release 2.2.7-SNAPSHOT (#401) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4f8a09455da..07e1a6abf9c 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.6 + 2.2.7-SNAPSHOT From e84bd2d09bfbc34cfca408434e63deec91393477 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jan 2021 18:30:29 +0100 Subject: [PATCH 149/406] test(deps): update dependency com.google.truth:truth to v1.1.2 (#404) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.truth:truth](com/google/truth/truth) | `1.1` -> `1.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/compatibility-slim/1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/confidence-slim/1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index f68e3fd5f0e..3e7db902da8 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -47,7 +47,7 @@ com.google.truth truth - 1.1 + 1.1.2 test diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 07e1a6abf9c..8fc8eafd572 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -46,7 +46,7 @@ com.google.truth truth - 1.1 + 1.1.2 test diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index d4401800508..ee40765493f 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -56,7 +56,7 @@ com.google.truth truth - 1.1 + 1.1.2 test From f25c9ad43a1d4e29bb328b2e351dc35dded4f28e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Feb 2021 19:04:19 +0100 Subject: [PATCH 150/406] test(deps): update dependency junit:junit to v4.13.2 (#423) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [junit:junit](http://junit.org) ([source](https://togithub.com/junit-team/junit4)) | `4.13.1` -> `4.13.2` | [![age](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/compatibility-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/junit:junit/4.13.2/confidence-slim/4.13.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3e7db902da8..0fb04e41c69 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -41,7 +41,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 8fc8eafd572..773c897664d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -40,7 +40,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index ee40765493f..78d307212de 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -50,7 +50,7 @@ junit junit - 4.13.1 + 4.13.2 test From c0f0f73e944755e6b818329bb937c5dfd2faa220 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 21:42:05 +0000 Subject: [PATCH 151/406] chore(master): release 2.2.7 (#424) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.7](https://www.github.com/googleapis/java-dlp/compare/v2.2.6...v2.2.7) (2021-02-22) ### Documentation * generate sample code in the Java microgenerator ([#419](https://www.github.com/googleapis/java-dlp/issues/419)) ([f65322c](https://www.github.com/googleapis/java-dlp/commit/f65322cf1fd0572bf08b00097e354fbcae5e7c1b)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#430](https://www.github.com/googleapis/java-dlp/issues/430)) ([54a5ffc](https://www.github.com/googleapis/java-dlp/commit/54a5ffcdcd7220aecd8a791376e823b45208ec56)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 773c897664d..b7d0c6445fe 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.7-SNAPSHOT + 2.2.7 From e564a0d7f964b0e8b10d1fbebf8d7a084ad03ec2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 21:50:09 +0000 Subject: [PATCH 152/406] chore(master): release 2.2.8-SNAPSHOT (#432) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index b7d0c6445fe..2de4a942138 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.7 + 2.2.8-SNAPSHOT From 5b1a83d85a49a7dc0738f8a7cc3abb0797aed890 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 20:36:11 +0100 Subject: [PATCH 153/406] chore(deps): update dependency com.google.cloud:libraries-bom to v17 (#433) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `16.2.1` -> `17.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/compatibility-slim/16.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/17.0.0/confidence-slim/16.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 78d307212de..827e7f75751 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.1 + 17.0.0 pom import From fd2babf584670ec185ea8be7c057588ced657f7e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 20:50:08 +0100 Subject: [PATCH 154/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.7 (#422) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.2.5` -> `2.2.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.7/compatibility-slim/2.2.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.7/confidence-slim/2.2.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.2.7`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​227-httpswwwgithubcomgoogleapisjava-dlpcomparev226v227-2021-02-22) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.6...v2.2.7) ### [`v2.2.6`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​226-httpswwwgithubcomgoogleapisjava-dlpcomparev225v226-2021-01-14) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.5...v2.2.6)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0fb04e41c69..f848ca65249 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.5 + 2.2.7 From e477a2c12c48472407be8a18eeaf465a3ed4bc18 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 23:49:52 +0100 Subject: [PATCH 155/406] samples(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.111.2 (#412) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index f848ca65249..c3482de49db 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.110.3 + 1.111.2 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2de4a942138..1ac54321be0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.110.3 + 1.111.2 junit From 7648fcc959185944c83f39f674bd482cbf99df9d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Feb 2021 01:14:05 +0100 Subject: [PATCH 156/406] chore(deps): update dependency com.google.cloud:libraries-bom to v18 (#436) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `17.0.0` -> `18.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/compatibility-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/confidence-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 827e7f75751..18f1f120b6a 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 17.0.0 + 18.0.0 pom import From d9e000516e7ffb1cb5503eb4c0aa33a3cba6d4d7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Feb 2021 18:42:16 +0100 Subject: [PATCH 157/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.111.3 (#439) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.111.2` -> `1.111.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.3/compatibility-slim/1.111.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.3/confidence-slim/1.111.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index c3482de49db..894202a1c6f 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.111.2 + 1.111.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 1ac54321be0..9862930b85e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.111.2 + 1.111.3 junit From fc6114f426621109cad3d8519c7b39e6c0ff74b0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 17:50:29 +0000 Subject: [PATCH 158/406] chore(master): release 2.2.8 (#441) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.8](https://www.github.com/googleapis/java-dlp/compare/v2.2.7...v2.2.8) (2021-02-26) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.111.3 ([#439](https://www.github.com/googleapis/java-dlp/issues/439)) ([80909a7](https://www.github.com/googleapis/java-dlp/commit/80909a7d01995598c775b358bc34cc69720c87b1)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#440](https://www.github.com/googleapis/java-dlp/issues/440)) ([ac3bcd3](https://www.github.com/googleapis/java-dlp/commit/ac3bcd376f62cd51184accc3a2ac60981815e6ee)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9862930b85e..1a044bc90d6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.8-SNAPSHOT + 2.2.8 From 7f3f58dcd9108204b51dd1a5be1e721bac0e8898 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 17:58:10 +0000 Subject: [PATCH 159/406] chore(master): release 2.2.9-SNAPSHOT (#442) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 1a044bc90d6..7da65cb4599 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.8 + 2.2.9-SNAPSHOT From 1b210aaa5095d8589a91b74572fd91234f31cba2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Feb 2021 20:46:08 +0100 Subject: [PATCH 160/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.111.4 (#443) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.111.3` -> `1.111.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.4/compatibility-slim/1.111.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.111.4/confidence-slim/1.111.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.111.4`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11114-httpswwwgithubcomgoogleapisjava-pubsubcomparev11113v11114-2021-02-26) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.111.3...v1.111.4)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 894202a1c6f..dba4e23ba3a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.111.3 + 1.111.4 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7da65cb4599..2c088c7a1f7 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.111.3 + 1.111.4 junit From bad61dcb52d56290bb0561e8b19fef38e7ef2a4f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 20:08:05 +0000 Subject: [PATCH 161/406] chore(master): release 2.2.9 (#445) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.9](https://www.github.com/googleapis/java-dlp/compare/v2.2.8...v2.2.9) (2021-02-26) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.111.4 ([#443](https://www.github.com/googleapis/java-dlp/issues/443)) ([053fb97](https://www.github.com/googleapis/java-dlp/commit/053fb9727276d95ffc31ed7da257ab0a432c7cc7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2c088c7a1f7..0b0334ea763 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.9-SNAPSHOT + 2.2.9 From 311a88df8166e65641b639d16f15255df981e875 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 20:24:05 +0000 Subject: [PATCH 162/406] chore(master): release 2.2.10-SNAPSHOT (#447) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 0b0334ea763..13549465126 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.9 + 2.2.10-SNAPSHOT From 169f42fad366952f9ae0335d6ddf58307e27da36 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Mar 2021 20:36:28 +0100 Subject: [PATCH 163/406] chore(deps): update dependency com.google.cloud:libraries-bom to v18.1.0 (#452) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `18.0.0` -> `18.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/compatibility-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.1.0/confidence-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 18f1f120b6a..d44fe0b520a 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 18.0.0 + 18.1.0 pom import From 8b1d4aabcc2144097584b1f605ac45c2f9b1cce7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Mar 2021 20:38:17 +0100 Subject: [PATCH 164/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.2.9 (#444) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.2.7` -> `2.2.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.9/compatibility-slim/2.2.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.2.9/confidence-slim/2.2.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.2.9`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​229-httpswwwgithubcomgoogleapisjava-dlpcomparev228v229-2021-02-26) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.8...v2.2.9)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index dba4e23ba3a..988e456c3a6 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.7 + 2.2.9 From c16c952c4cdbad3106aad7d53f0ef74f8c6194d2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Mar 2021 20:36:25 +0100 Subject: [PATCH 165/406] chore(deps): update dependency com.google.cloud:libraries-bom to v19 (#455) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `18.1.0` -> `19.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/compatibility-slim/18.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/confidence-slim/18.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index d44fe0b520a..6a46bd05b29 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 18.1.0 + 19.0.0 pom import From 7c21d492c45bfc5a2e95c1629108d4bf891c033d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 01:34:05 +0000 Subject: [PATCH 166/406] chore: release 2.3.0 (#449) :robot: I have created a release \*beep\* \*boop\* --- ## [2.3.0](https://www.github.com/googleapis/java-dlp/compare/v2.2.9...v2.3.0) (2021-03-11) ### Features * **generator:** update protoc to v3.15.3 ([#448](https://www.github.com/googleapis/java-dlp/issues/448)) ([a1364b3](https://www.github.com/googleapis/java-dlp/commit/a1364b34da45d59212fd00c6c8fc17ba0f17ee8d)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#461](https://www.github.com/googleapis/java-dlp/issues/461)) ([91384fd](https://www.github.com/googleapis/java-dlp/commit/91384fd97a4dc7d40839d5580e8f7dc1ae3f371b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 13549465126..03714d1b9c1 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.2.10-SNAPSHOT + 2.3.0 From fe1a9e2466daac7b0527ba5dd7135cd7948a19b7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 01:40:06 +0000 Subject: [PATCH 167/406] chore: release 2.3.1-SNAPSHOT (#463) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 03714d1b9c1..81a390fb0cc 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.0 + 2.3.1-SNAPSHOT From 80a604c16fe1c83045d5373a5a7dd9a01fc9e804 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Mar 2021 21:08:22 +0100 Subject: [PATCH 168/406] chore(deps): update dependency com.google.cloud:libraries-bom to v19.1.0 (#468) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.0.0` -> `19.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/compatibility-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/confidence-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 6a46bd05b29..b32ea4a6ab2 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.0.0 + 19.1.0 pom import From cf91d152791994952f62f7a4198822730fe046b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Mar 2021 19:04:22 +0100 Subject: [PATCH 169/406] chore(deps): update dependency com.google.cloud:libraries-bom to v19.2.1 (#470) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.1.0` -> `19.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/compatibility-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/confidence-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index b32ea4a6ab2..26c71c7402d 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.1.0 + 19.2.1 pom import From 9b7fff8b383c791c5107ad2752125aa54807b559 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 16:42:02 +0100 Subject: [PATCH 170/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.3.0 (#464) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.2.9` -> `2.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.0/compatibility-slim/2.2.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.0/confidence-slim/2.2.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.3.0`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​230-httpswwwgithubcomgoogleapisjava-dlpcomparev229v230-2021-03-11) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.2.9...v2.3.0) ##### Features - **generator:** update protoc to v3.15.3 ([#​448](https://www.github.com/googleapis/java-dlp/issues/448)) ([a1364b3](https://www.github.com/googleapis/java-dlp/commit/a1364b34da45d59212fd00c6c8fc17ba0f17ee8d)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#​461](https://www.github.com/googleapis/java-dlp/issues/461)) ([91384fd](https://www.github.com/googleapis/java-dlp/commit/91384fd97a4dc7d40839d5580e8f7dc1ae3f371b)) ##### [2.2.9](https://www.github.com/googleapis/java-dlp/compare/v2.2.8...v2.2.9) (2021-02-26) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.111.4 ([#​443](https://www.github.com/googleapis/java-dlp/issues/443)) ([053fb97](https://www.github.com/googleapis/java-dlp/commit/053fb9727276d95ffc31ed7da257ab0a432c7cc7)) ##### [2.2.8](https://www.github.com/googleapis/java-dlp/compare/v2.2.7...v2.2.8) (2021-02-26) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.111.3 ([#​439](https://www.github.com/googleapis/java-dlp/issues/439)) ([80909a7](https://www.github.com/googleapis/java-dlp/commit/80909a7d01995598c775b358bc34cc69720c87b1)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#​440](https://www.github.com/googleapis/java-dlp/issues/440)) ([ac3bcd3](https://www.github.com/googleapis/java-dlp/commit/ac3bcd376f62cd51184accc3a2ac60981815e6ee)) ##### [2.2.7](https://www.github.com/googleapis/java-dlp/compare/v2.2.6...v2.2.7) (2021-02-22) ##### Documentation - generate sample code in the Java microgenerator ([#​419](https://www.github.com/googleapis/java-dlp/issues/419)) ([f65322c](https://www.github.com/googleapis/java-dlp/commit/f65322cf1fd0572bf08b00097e354fbcae5e7c1b)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#​430](https://www.github.com/googleapis/java-dlp/issues/430)) ([54a5ffc](https://www.github.com/googleapis/java-dlp/commit/54a5ffcdcd7220aecd8a791376e823b45208ec56)) ##### [2.2.6](https://www.github.com/googleapis/java-dlp/compare/v2.2.5...v2.2.6) (2021-01-14) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#​399](https://www.github.com/googleapis/java-dlp/issues/399)) ([9761941](https://www.github.com/googleapis/java-dlp/commit/97619410a08a2b3cecc38f2aa650164ef6f4a696)) ##### [2.2.5](https://www.github.com/googleapis/java-dlp/compare/v2.2.4...v2.2.5) (2021-01-06) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.110.3 ([#​390](https://www.github.com/googleapis/java-dlp/issues/390)) ([76b67ec](https://www.github.com/googleapis/java-dlp/commit/76b67ecdb1a95979399a496a536f10f91a1aebc3)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#​381](https://www.github.com/googleapis/java-dlp/issues/381)) ([e064751](https://www.github.com/googleapis/java-dlp/commit/e0647511d3cc143936d5f33df2b254c93d039540)) ##### [2.2.4](https://www.github.com/googleapis/java-dlp/compare/v2.2.3...v2.2.4) (2020-12-14) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([#​376](https://www.github.com/googleapis/java-dlp/issues/376)) ([163bb4e](https://www.github.com/googleapis/java-dlp/commit/163bb4e6447513aa6d3df681fa074b7ac3c05e6f)) ##### [2.2.3](https://www.github.com/googleapis/java-dlp/compare/v2.2.2...v2.2.3) (2020-12-08) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#​365](https://www.github.com/googleapis/java-dlp/issues/365)) ([1156bc7](https://www.github.com/googleapis/java-dlp/commit/1156bc7d0a203f6110d007727834358b1a48a8ea)) ##### [2.2.2](https://www.github.com/googleapis/java-dlp/compare/v2.2.1...v2.2.2) (2020-11-17) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.15.0 ([#​346](https://www.github.com/googleapis/java-dlp/issues/346)) ([3acd318](https://www.github.com/googleapis/java-dlp/commit/3acd318e84ac13a44a2c53d171e129857c4ea51b)) ##### [2.2.1](https://www.github.com/googleapis/java-dlp/compare/v2.2.0...v2.2.1) (2020-10-31) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#​332](https://www.github.com/googleapis/java-dlp/issues/332)) ([7dd78c4](https://www.github.com/googleapis/java-dlp/commit/7dd78c4b65b8948a9a9e3158c44c44f3617d5f25))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 988e456c3a6..0e181f22d69 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.2.9 + 2.3.0 From 288e77a7885aad444204216c31b5ec943073c0f0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Apr 2021 19:52:11 +0200 Subject: [PATCH 171/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.22 (#479) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.cloud.samples:shared-configuration | `1.0.21` -> `1.0.22` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/compatibility-slim/1.0.21)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.22/confidence-slim/1.0.21)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0e181f22d69..874fe37b75f 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 82adf24d70b..2d87b019b92 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 81a390fb0cc..8208403ea8e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 26c71c7402d..0421afdf49b 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 From 8f3fdc2ffab2a69d86636fe3496b32d50542c9f3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Apr 2021 20:38:14 +0200 Subject: [PATCH 172/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.112.0 (#467) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.111.4` -> `1.112.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.0/compatibility-slim/1.111.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.0/confidence-slim/1.111.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.112.0`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11120-httpswwwgithubcomgoogleapisjava-pubsubcomparev11114v11120-2021-03-16) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.111.4...v1.112.0) ##### Features - expose default client configs ([#​541](https://www.github.com/googleapis/java-pubsub/issues/541)) ([01e6daf](https://www.github.com/googleapis/java-pubsub/commit/01e6dafb569a37c661463b79f5afbfba4f6d188d)) ##### Bug Fixes - properly shutdown subscriber stub on permanent streaming pull failure ([#​539](https://www.github.com/googleapis/java-pubsub/issues/539)) ([adbcc0c](https://www.github.com/googleapis/java-pubsub/commit/adbcc0c6777e35eae24b538e6c48f9ef7485a786)) - update MessageDispatcher to not extend deadlines of messages which arrive early to 60s ([#​570](https://www.github.com/googleapis/java-pubsub/issues/570)) ([e174e20](https://www.github.com/googleapis/java-pubsub/commit/e174e2043f64563f4d2868537aeb90d948233166)) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v1.94.3 ([#​566](https://www.github.com/googleapis/java-pubsub/issues/566)) ([3f23ac6](https://www.github.com/googleapis/java-pubsub/commit/3f23ac6cda00814f74f2c435dd8a05b70ac69d27)) - update dependency com.google.cloud:google-cloud-core to v1.94.4 ([#​568](https://www.github.com/googleapis/java-pubsub/issues/568)) ([21886d3](https://www.github.com/googleapis/java-pubsub/commit/21886d39cdc2a33275c2061578c877b0fa6aee98)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#​564](https://www.github.com/googleapis/java-pubsub/issues/564)) ([0aa4521](https://www.github.com/googleapis/java-pubsub/commit/0aa452121b2fa769221b41c8c1323f3b31b599d1)) - update dependency com.google.protobuf:protobuf-java-util to v3.15.5 ([#​559](https://www.github.com/googleapis/java-pubsub/issues/559)) ([74e6a92](https://www.github.com/googleapis/java-pubsub/commit/74e6a92ca88f006e0fe1a68144ba0cb30a1d140c)) - update dependency com.google.protobuf:protobuf-java-util to v3.15.6 ([#​569](https://www.github.com/googleapis/java-pubsub/issues/569)) ([b6e299f](https://www.github.com/googleapis/java-pubsub/commit/b6e299f6d13dab7d5b2e8c575021371485878bb2)) ##### Documentation - Remove experimental note for schema APIs ([#​560](https://www.github.com/googleapis/java-pubsub/issues/560)) ([4b98556](https://www.github.com/googleapis/java-pubsub/commit/4b98556e550802135cfb87d8984f0deec57e8c2e)) ##### [1.111.4](https://www.github.com/googleapis/java-pubsub/compare/v1.111.3...v1.111.4) (2021-02-26) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.15.3 ([#​546](https://www.github.com/googleapis/java-pubsub/issues/546)) ([3c10d2c](https://www.github.com/googleapis/java-pubsub/commit/3c10d2cf7cb8fab1c2dad8e80ea8ad7723e4e899)) ##### [1.111.3](https://www.github.com/googleapis/java-pubsub/compare/v1.111.2...v1.111.3) (2021-02-25) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#​542](https://www.github.com/googleapis/java-pubsub/issues/542)) ([ff9dc0d](https://www.github.com/googleapis/java-pubsub/commit/ff9dc0d5becf281aea855eeb0d246e938ed5e09c)) ##### [1.111.2](https://www.github.com/googleapis/java-pubsub/compare/v1.111.1...v1.111.2) (2021-02-24) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.15.2 ([#​524](https://www.github.com/googleapis/java-pubsub/issues/524)) ([b5e07a8](https://www.github.com/googleapis/java-pubsub/commit/b5e07a866f096744feafc6187bcb022669f5fa26)) ##### [1.111.1](https://www.github.com/googleapis/java-pubsub/compare/v1.111.0...v1.111.1) (2021-02-23) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#​515](https://www.github.com/googleapis/java-pubsub/issues/515)) ([073c3b8](https://www.github.com/googleapis/java-pubsub/commit/073c3b84965a4225d735743d5f4e540330cf26b7))
--- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 874fe37b75f..ae66ea5bd04 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.111.4 + 1.112.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 8208403ea8e..3a4be4f5be4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.111.4 + 1.112.0 junit From 070312523a91a98513b3a31d5e06c2268674488f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Apr 2021 17:28:12 +0200 Subject: [PATCH 173/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20 (#486) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `19.2.1` -> `20.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.0.0/compatibility-slim/19.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.0.0/confidence-slim/19.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0421afdf49b..add76db9baf 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 19.2.1 + 20.0.0 pom import From 676009dc9dbecd9f41717d68b7b987331e32260d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 22:00:10 +0000 Subject: [PATCH 174/406] chore: release 2.3.1 (#473) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.1](https://www.github.com/googleapis/java-dlp/compare/v2.3.0...v2.3.1) (2021-04-12) ### Documentation * version update ([#472](https://www.github.com/googleapis/java-dlp/issues/472)) ([f3186cd](https://www.github.com/googleapis/java-dlp/commit/f3186cdb10f191985bca4dcc2c3176537c3b2aa0)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.112.0 ([#467](https://www.github.com/googleapis/java-dlp/issues/467)) ([39636a5](https://www.github.com/googleapis/java-dlp/commit/39636a574c585b145cc509b2f93fb1187a218941)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#483](https://www.github.com/googleapis/java-dlp/issues/483)) ([ed17f67](https://www.github.com/googleapis/java-dlp/commit/ed17f67e0b20dcdbefd99dcfc0241b0a3a84bcc0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 3a4be4f5be4..ee26b499ce6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.1-SNAPSHOT + 2.3.1 From 42e025e64be0dfc39f074da1d1128f3f151e154d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Apr 2021 22:08:06 +0000 Subject: [PATCH 175/406] chore: release 2.3.2-SNAPSHOT (#488) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ee26b499ce6..dc5f11028db 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.1 + 2.3.2-SNAPSHOT From 418e8d0462eb35ffc099b4f5efa5b0c71e56c8d7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 13 Apr 2021 14:17:20 +0200 Subject: [PATCH 176/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.112.1 (#490) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index ae66ea5bd04..2057408414a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.112.0 + 1.112.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index dc5f11028db..36a8e2c4778 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.112.0 + 1.112.1 junit From c6f4f79a31af415ef779a4423923b710e6c58155 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 19 Apr 2021 16:44:11 +0200 Subject: [PATCH 177/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.1.0 (#495) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.0.0` -> `20.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.1.0/compatibility-slim/20.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.1.0/confidence-slim/20.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index add76db9baf..4e691aab3f3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.0.0 + 20.1.0 pom import From 7180dc31ae730496102b1f2e3a58705934b277bb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Apr 2021 01:24:20 +0200 Subject: [PATCH 178/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.112.3 (#501) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.112.1` -> `1.112.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.3/compatibility-slim/1.112.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.3/confidence-slim/1.112.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.112.3`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11123-httpswwwgithubcomgoogleapisjava-pubsubcomparev11122v11123-2021-04-26) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.112.2...v1.112.3) ### [`v1.112.2`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11122-httpswwwgithubcomgoogleapisjava-pubsubcomparev11121v11122-2021-04-24) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.112.1...v1.112.2)
--- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 2057408414a..e85f2ca5948 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.112.1 + 1.112.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 36a8e2c4778..2bc70332366 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.112.1 + 1.112.3 junit From 1c7083f78b9ff4df09cf322ee584f35a290e5c18 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 Apr 2021 00:50:14 +0000 Subject: [PATCH 179/406] chore: release 2.3.2 (#491) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.2](https://www.github.com/googleapis/java-dlp/compare/v2.3.1...v2.3.2) (2021-04-26) ### Bug Fixes * release scripts from issuing overlapping phases ([#494](https://www.github.com/googleapis/java-dlp/issues/494)) ([5675143](https://www.github.com/googleapis/java-dlp/commit/5675143b2710756e2802d26685c51796c0a86085)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.112.1 ([#490](https://www.github.com/googleapis/java-dlp/issues/490)) ([5924f7a](https://www.github.com/googleapis/java-dlp/commit/5924f7a10860aa46443b0da5988a45440e547cfb)) * update dependency com.google.cloud:google-cloud-pubsub to v1.112.3 ([#501](https://www.github.com/googleapis/java-dlp/issues/501)) ([1047216](https://www.github.com/googleapis/java-dlp/commit/10472167f1a7f573e967dffe7ca183c14ab92e9b)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#497](https://www.github.com/googleapis/java-dlp/issues/497)) ([a6bbefa](https://www.github.com/googleapis/java-dlp/commit/a6bbefa7b06898bc2fee697172300f4b034d0fff)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#500](https://www.github.com/googleapis/java-dlp/issues/500)) ([c317dfd](https://www.github.com/googleapis/java-dlp/commit/c317dfd4a55febc6e9877d948e2d996a4e47b776)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2bc70332366..f20eda9e94b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.2-SNAPSHOT + 2.3.2 From d70bb08c72388ad4626a7e9c227b89c11c17266a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 27 Apr 2021 00:56:13 +0000 Subject: [PATCH 180/406] chore: release 2.3.3-SNAPSHOT (#502) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f20eda9e94b..26ebe35dc7d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.2 + 2.3.3-SNAPSHOT From c6d9e7038ce31deb20aecd0d0c93f4cc74835008 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 29 Apr 2021 17:42:11 +0200 Subject: [PATCH 181/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.2.0 (#505) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.1.0` -> `20.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/compatibility-slim/20.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/confidence-slim/20.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 4e691aab3f3..af2753d642f 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.1.0 + 20.2.0 pom import From 3cf4b3337e74e7bbde0deedc19506bad4cefc7b9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Apr 2021 20:14:42 +0200 Subject: [PATCH 182/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.3.2 (#489) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.3.0` -> `2.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.2/compatibility-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.2/confidence-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.3.2`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​232-httpswwwgithubcomgoogleapisjava-dlpcomparev231v232-2021-04-26) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.3.1...v2.3.2) ### [`v2.3.1`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​231-httpswwwgithubcomgoogleapisjava-dlpcomparev230v231-2021-04-12) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.3.0...v2.3.1)
--- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index e85f2ca5948..11393839285 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.3.0 + 2.3.2 From 7c92a81141e73745c7044a831aadb995822937e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 01:40:13 +0000 Subject: [PATCH 183/406] chore: release 2.3.3 (#515) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.3](https://www.github.com/googleapis/java-dlp/compare/v2.3.2...v2.3.3) (2021-05-11) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#514](https://www.github.com/googleapis/java-dlp/issues/514)) ([b5143f5](https://www.github.com/googleapis/java-dlp/commit/b5143f5e12b6ad4910f49188589e3f49842bc9a8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 26ebe35dc7d..88c8269051a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.3-SNAPSHOT + 2.3.3 From 5d31c5987ca4661dd5e3f46ac0d7b47308aecd95 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 01:52:08 +0000 Subject: [PATCH 184/406] chore: release 2.3.4-SNAPSHOT (#516) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 88c8269051a..edbc4af0ce2 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.3 + 2.3.4-SNAPSHOT From aa9476122132aa981bd68526552b212c022d7c7b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 13 May 2021 15:56:15 +0200 Subject: [PATCH 185/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.3.0 (#512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.2.0` -> `20.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/compatibility-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/confidence-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index af2753d642f..92a8363ad92 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.2.0 + 20.3.0 pom import From bdf2ede71c6ce7037cd76850a08e846a1539e4af Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 04:12:27 +0200 Subject: [PATCH 186/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.3.3 (#517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.3.2` -> `2.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.3/compatibility-slim/2.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.3/confidence-slim/2.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.3.3`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​233-httpswwwgithubcomgoogleapisjava-dlpcomparev232v233-2021-05-11) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.3.2...v2.3.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 11393839285..13e2406e5a6 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.3.2 + 2.3.3 From 4f7112646db87616446ff707a263e96c6f09a42c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 17:52:10 +0200 Subject: [PATCH 187/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.112.5 (#522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.112.3` -> `1.112.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.5/compatibility-slim/1.112.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.112.5/confidence-slim/1.112.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.112.5`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11125-httpswwwgithubcomgoogleapisjava-pubsubcomparev11124v11125-2021-05-14) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.112.4...v1.112.5) ### [`v1.112.4`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11124-httpswwwgithubcomgoogleapisjava-pubsubcomparev11123v11124-2021-05-12) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.112.3...v1.112.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 13e2406e5a6..f27505fb910 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.112.3 + 1.112.5 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index edbc4af0ce2..37529c67c79 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.112.3 + 1.112.5 junit From 0b39dc0222d049aa4f058b1e67549f40bee6da1f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 16:14:06 +0000 Subject: [PATCH 188/406] chore: release 2.3.4 (#523) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/java-dlp/compare/v2.3.3...v2.3.4) (2021-05-14) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.112.5 ([#522](https://www.github.com/googleapis/java-dlp/issues/522)) ([bf33cd2](https://www.github.com/googleapis/java-dlp/commit/bf33cd208ec34501d915b69ad6976efc6437fc8d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 37529c67c79..2c45bc654d7 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.4-SNAPSHOT + 2.3.4 From c6559483ad462c30c4409682d5711bad8269acf2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 14 May 2021 16:24:11 +0000 Subject: [PATCH 189/406] chore: release 2.3.5-SNAPSHOT (#524) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2c45bc654d7..77966a6c42e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.4 + 2.3.5-SNAPSHOT From ea046d8f0fe2baf02be0767d1286dfcc0d993d0b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 17 May 2021 03:46:19 +0200 Subject: [PATCH 190/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.4.0 (#527) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.3.0` -> `20.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/compatibility-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/confidence-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 92a8363ad92..d2e67026885 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.3.0 + 20.4.0 pom import From 1981b356ef3507bfd3df6ddf493879ffee2aee7d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 22:56:17 +0200 Subject: [PATCH 191/406] test(deps): update dependency com.google.truth:truth to v1.1.3 (#538) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.truth:truth | `1.1.2` -> `1.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/compatibility-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/confidence-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index f27505fb910..291f9a08e00 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -47,7 +47,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 77966a6c42e..4b12ba8ead1 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -46,7 +46,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index d2e67026885..55559ec07b0 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -56,7 +56,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test From c3272de52297c4ab8bce8f2091cf9d71ba2a3752 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 23:40:16 +0200 Subject: [PATCH 192/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.3.4 (#525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.3.3` -> `2.3.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.4/compatibility-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.3.4/confidence-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.3.4`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​234-httpswwwgithubcomgoogleapisjava-dlpcomparev233v234-2021-05-14) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.3.3...v2.3.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 291f9a08e00..048616a8e68 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.3.3 + 2.3.4 From bb11fbbeac6ca319ab9a5c9f9ec27c83988119df Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 May 2021 20:02:19 +0200 Subject: [PATCH 193/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.5.0 (#537) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.4.0` -> `20.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.5.0/compatibility-slim/20.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.5.0/confidence-slim/20.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 55559ec07b0..6d9b52ab5c9 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.4.0 + 20.5.0 pom import From 16b5d627f496f88b7ba5de9c4eea9b137e25612a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 22:18:12 +0000 Subject: [PATCH 194/406] chore: release 2.4.0 (#533) :robot: I have created a release \*beep\* \*boop\* --- ## [2.4.0](https://www.github.com/googleapis/java-dlp/compare/v2.3.4...v2.4.0) (2021-05-31) ### Features * add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#531](https://www.github.com/googleapis/java-dlp/issues/531)) ([5bc1ab9](https://www.github.com/googleapis/java-dlp/commit/5bc1ab99c9f145d6f1becb05869b8be682821afa)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#532](https://www.github.com/googleapis/java-dlp/issues/532)) ([2a82b38](https://www.github.com/googleapis/java-dlp/commit/2a82b38d4b46f6145f8d1dc298dc52b819360afd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4b12ba8ead1..d3283180b7f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.3.5-SNAPSHOT + 2.4.0 From 47aca6f43f1daaddf2e588b9f8f4504c7d64e6d3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 22:24:11 +0000 Subject: [PATCH 195/406] chore: release 2.4.1-SNAPSHOT (#542) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d3283180b7f..ef35490d427 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.0 + 2.4.1-SNAPSHOT From f6b18a08ac6c37eec857a443f4f61af5a16631e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Jun 2021 22:10:28 +0200 Subject: [PATCH 196/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.4.0 (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.3.4` -> `2.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.0/compatibility-slim/2.3.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.0/confidence-slim/2.3.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.4.0`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​240-httpswwwgithubcomgoogleapisjava-dlpcomparev234v240-2021-05-31) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.3.4...v2.4.0) ##### Features - add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#​531](https://www.github.com/googleapis/java-dlp/issues/531)) ([5bc1ab9](https://www.github.com/googleapis/java-dlp/commit/5bc1ab99c9f145d6f1becb05869b8be682821afa)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#​532](https://www.github.com/googleapis/java-dlp/issues/532)) ([2a82b38](https://www.github.com/googleapis/java-dlp/commit/2a82b38d4b46f6145f8d1dc298dc52b819360afd)) ##### [2.3.4](https://www.github.com/googleapis/java-dlp/compare/v2.3.3...v2.3.4) (2021-05-14) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.112.5 ([#​522](https://www.github.com/googleapis/java-dlp/issues/522)) ([bf33cd2](https://www.github.com/googleapis/java-dlp/commit/bf33cd208ec34501d915b69ad6976efc6437fc8d)) ##### [2.3.3](https://www.github.com/googleapis/java-dlp/compare/v2.3.2...v2.3.3) (2021-05-11) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#​514](https://www.github.com/googleapis/java-dlp/issues/514)) ([b5143f5](https://www.github.com/googleapis/java-dlp/commit/b5143f5e12b6ad4910f49188589e3f49842bc9a8)) ##### [2.3.2](https://www.github.com/googleapis/java-dlp/compare/v2.3.1...v2.3.2) (2021-04-26) ##### Bug Fixes - release scripts from issuing overlapping phases ([#​494](https://www.github.com/googleapis/java-dlp/issues/494)) ([5675143](https://www.github.com/googleapis/java-dlp/commit/5675143b2710756e2802d26685c51796c0a86085)) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.112.1 ([#​490](https://www.github.com/googleapis/java-dlp/issues/490)) ([5924f7a](https://www.github.com/googleapis/java-dlp/commit/5924f7a10860aa46443b0da5988a45440e547cfb)) - update dependency com.google.cloud:google-cloud-pubsub to v1.112.3 ([#​501](https://www.github.com/googleapis/java-dlp/issues/501)) ([1047216](https://www.github.com/googleapis/java-dlp/commit/10472167f1a7f573e967dffe7ca183c14ab92e9b)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#​497](https://www.github.com/googleapis/java-dlp/issues/497)) ([a6bbefa](https://www.github.com/googleapis/java-dlp/commit/a6bbefa7b06898bc2fee697172300f4b034d0fff)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#​500](https://www.github.com/googleapis/java-dlp/issues/500)) ([c317dfd](https://www.github.com/googleapis/java-dlp/commit/c317dfd4a55febc6e9877d948e2d996a4e47b776)) ##### [2.3.1](https://www.github.com/googleapis/java-dlp/compare/v2.3.0...v2.3.1) (2021-04-12) ##### Documentation - version update ([#​472](https://www.github.com/googleapis/java-dlp/issues/472)) ([f3186cd](https://www.github.com/googleapis/java-dlp/commit/f3186cdb10f191985bca4dcc2c3176537c3b2aa0)) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.112.0 ([#​467](https://www.github.com/googleapis/java-dlp/issues/467)) ([39636a5](https://www.github.com/googleapis/java-dlp/commit/39636a574c585b145cc509b2f93fb1187a218941)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#​483](https://www.github.com/googleapis/java-dlp/issues/483)) ([ed17f67](https://www.github.com/googleapis/java-dlp/commit/ed17f67e0b20dcdbefd99dcfc0241b0a3a84bcc0))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 048616a8e68..53d5c263468 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.3.4 + 2.4.0 From 9056458f9db195b97a85c760b8a69f0321c5db04 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Jun 2021 22:16:27 +0200 Subject: [PATCH 197/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.113.0 (#544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.112.5` -> `1.113.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.0/compatibility-slim/1.112.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.0/confidence-slim/1.112.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.113.0`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11130-httpswwwgithubcomgoogleapisjava-pubsubcomparev11125v11130-2021-05-31) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.112.5...v1.113.0) ##### Features - add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#​673](https://www.github.com/googleapis/java-pubsub/issues/673)) ([51dfca3](https://www.github.com/googleapis/java-pubsub/commit/51dfca3049f87e8bc1163c03eaef0556be3eefdf)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#​672](https://www.github.com/googleapis/java-pubsub/issues/672)) ([2cc9ec5](https://www.github.com/googleapis/java-pubsub/commit/2cc9ec5f1418f23a89129bdfc038dcf461097b88)) - update dependency com.google.errorprone:error_prone_annotations to v2.7.1 ([#​667](https://www.github.com/googleapis/java-pubsub/issues/667)) ([885be5c](https://www.github.com/googleapis/java-pubsub/commit/885be5c37992b8b1175c55b407db0f833241a0d1)) - update dependency com.google.protobuf:protobuf-java-util to v3.17.1 ([#​679](https://www.github.com/googleapis/java-pubsub/issues/679)) ([e7ef708](https://www.github.com/googleapis/java-pubsub/commit/e7ef7088999f60dc8bd5268c0315a8e1e4639ae0)) ##### [1.112.5](https://www.github.com/googleapis/java-pubsub/compare/v1.112.4...v1.112.5) (2021-05-14) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.17.0 ([#​660](https://www.github.com/googleapis/java-pubsub/issues/660)) ([5f33acf](https://www.github.com/googleapis/java-pubsub/commit/5f33acf204bd5d3a62eb06fc64a4ad779458ed82)) ##### [1.112.4](https://www.github.com/googleapis/java-pubsub/compare/v1.112.3...v1.112.4) (2021-05-12) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#​651](https://www.github.com/googleapis/java-pubsub/issues/651)) ([96ab1d4](https://www.github.com/googleapis/java-pubsub/commit/96ab1d4ea484215fb951704d0d2f0dbbf2802544)) - update dependency com.google.protobuf:protobuf-java-util to v3.16.0 ([#​647](https://www.github.com/googleapis/java-pubsub/issues/647)) ([7fcc503](https://www.github.com/googleapis/java-pubsub/commit/7fcc503a790d28f3d07e07c0ca286a1ee031f38b)) ##### [1.112.3](https://www.github.com/googleapis/java-pubsub/compare/v1.112.2...v1.112.3) (2021-04-26) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v1.94.8 ([#​624](https://www.github.com/googleapis/java-pubsub/issues/624)) ([e1d6632](https://www.github.com/googleapis/java-pubsub/commit/e1d663262b618223d021f8304718f4b939423002)) ##### [1.112.2](https://www.github.com/googleapis/java-pubsub/compare/v1.112.1...v1.112.2) (2021-04-24) ##### Bug Fixes - release scripts from issuing overlapping phases ([#​610](https://www.github.com/googleapis/java-pubsub/issues/610)) ([70246e8](https://www.github.com/googleapis/java-pubsub/commit/70246e8fd24c7e85b0384d99bd3895094383ff5e)) - typo ([#​603](https://www.github.com/googleapis/java-pubsub/issues/603)) ([60b087d](https://www.github.com/googleapis/java-pubsub/commit/60b087d2e2afbadaff5dd0a3b946d46b61acbf95)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#​614](https://www.github.com/googleapis/java-pubsub/issues/614)) ([61e2ea1](https://www.github.com/googleapis/java-pubsub/commit/61e2ea112a4d44219adb20f087e7847114be4261)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#​626](https://www.github.com/googleapis/java-pubsub/issues/626)) ([a9884a9](https://www.github.com/googleapis/java-pubsub/commit/a9884a9beede67ce90616be2f1bdd7da1aa6f867)) - update dependency org.easymock:easymock to v4.3 ([#​612](https://www.github.com/googleapis/java-pubsub/issues/612)) ([b08e816](https://www.github.com/googleapis/java-pubsub/commit/b08e81604341381543b13f68bb0695c55d0a7575)) ##### [1.112.1](https://www.github.com/googleapis/java-pubsub/compare/v1.112.0...v1.112.1) (2021-04-12) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v1.94.6 ([#​590](https://www.github.com/googleapis/java-pubsub/issues/590)) ([902b149](https://www.github.com/googleapis/java-pubsub/commit/902b149b04d5d74b84051c4b09e54b14df20f6a2)) - update dependency com.google.cloud:google-cloud-core to v1.94.7 ([#​597](https://www.github.com/googleapis/java-pubsub/issues/597)) ([312966d](https://www.github.com/googleapis/java-pubsub/commit/312966d58c494864d57821ed1a75c84fd3de1aab)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#​592](https://www.github.com/googleapis/java-pubsub/issues/592)) ([f81b792](https://www.github.com/googleapis/java-pubsub/commit/f81b7929659b03d620789fef5dfc9e8fcb418c66)) - update dependency com.google.errorprone:error_prone_annotations to v2.6.0 ([#​585](https://www.github.com/googleapis/java-pubsub/issues/585)) ([8316bce](https://www.github.com/googleapis/java-pubsub/commit/8316bced8cf506a470c2f07cc578eda86305dd4e)) - update dependency com.google.protobuf:protobuf-java-util to v3.15.7 ([#​586](https://www.github.com/googleapis/java-pubsub/issues/586)) ([616e77d](https://www.github.com/googleapis/java-pubsub/commit/616e77df843a70edf7d5d972156b2e2371d928e4)) - update dependency com.google.protobuf:protobuf-java-util to v3.15.8 ([#​589](https://www.github.com/googleapis/java-pubsub/issues/589)) ([8adde2d](https://www.github.com/googleapis/java-pubsub/commit/8adde2d6741c8bc264f00e34255368ef527aa9ce)) - update dependency org.apache.avro:avro to v1.10.2 ([#​575](https://www.github.com/googleapis/java-pubsub/issues/575)) ([acd0c19](https://www.github.com/googleapis/java-pubsub/commit/acd0c1953aa4728699a03566632f4b1bf8bbe177))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 53d5c263468..335f38ab6f0 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.112.5 + 1.113.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ef35490d427..bc31d8335c5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.112.5 + 1.113.0 junit From 1923f266ddc278ac68b00500a554e28b00d70ea8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Jun 2021 20:28:16 +0000 Subject: [PATCH 198/406] chore: release 2.4.1 (#546) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.1](https://www.github.com/googleapis/java-dlp/compare/v2.4.0...v2.4.1) (2021-06-02) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.113.0 ([#544](https://www.github.com/googleapis/java-dlp/issues/544)) ([ad6ed0f](https://www.github.com/googleapis/java-dlp/commit/ad6ed0fe15f9e01f81c8faabd8b5250e1334cca7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index bc31d8335c5..aee53591f17 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.1-SNAPSHOT + 2.4.1 From f68d18161e1d20e5550e500ec3e8a1e936228114 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Jun 2021 20:42:17 +0000 Subject: [PATCH 199/406] chore: release 2.4.2-SNAPSHOT (#547) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index aee53591f17..d2420530b85 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.1 + 2.4.2-SNAPSHOT From d57840f5e29d898be0cf160ddea077a68b16ee0b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Jun 2021 02:20:25 +0200 Subject: [PATCH 200/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.4.1 (#548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.4.0` -> `2.4.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.1/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.1/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.4.1`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​241-httpswwwgithubcomgoogleapisjava-dlpcomparev240v241-2021-06-02) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.0...v2.4.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 335f38ab6f0..c1386573c73 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.4.0 + 2.4.1 From db5eb65c47ba8db70776288c2ddd3befb5346ecd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:22:16 +0000 Subject: [PATCH 201/406] chore: release 2.4.2 (#553) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.2](https://www.github.com/googleapis/java-dlp/compare/v2.4.1...v2.4.2) (2021-06-04) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 ([#551](https://www.github.com/googleapis/java-dlp/issues/551)) ([a80ff84](https://www.github.com/googleapis/java-dlp/commit/a80ff845bd95abb4e7b9f9d5bd85921e97b3a0c0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d2420530b85..9527ce47723 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.2-SNAPSHOT + 2.4.2 From 89e9e72e3f8c1831ef4a60db69a7b436786aaae1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:30:15 +0000 Subject: [PATCH 202/406] chore: release 2.4.3-SNAPSHOT (#554) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9527ce47723..f786908a6b0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.2 + 2.4.3-SNAPSHOT From f004a9e3c2a00fc10843f10aba9a74c697c723f6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Jun 2021 21:00:33 +0200 Subject: [PATCH 203/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.6.0 (#557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.5.0` -> `20.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/compatibility-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/confidence-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 6d9b52ab5c9..7f07b6b2fed 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.5.0 + 20.6.0 pom import From bae13caeb9a0470dfbf09ac04ee46358ef88f58f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Jun 2021 00:34:10 +0200 Subject: [PATCH 204/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.23 (#556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.cloud.samples:shared-configuration | `1.0.22` -> `1.0.23` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.23/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.23/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.23/compatibility-slim/1.0.22)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.0.23/confidence-slim/1.0.22)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index c1386573c73..dbea5937bd5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 2d87b019b92..91a9cf17a74 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f786908a6b0..f5e55ae8f89 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 7f07b6b2fed..52ac406b34d 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 From 77e621182c7cf3f1bd9d68f1f5e529463656ac67 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 11 Jun 2021 01:04:05 +0200 Subject: [PATCH 205/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.113.3 (#559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.113.0` -> `1.113.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.3/compatibility-slim/1.113.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.3/confidence-slim/1.113.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.113.3`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11133-httpswwwgithubcomgoogleapisjava-pubsubcomparev11132v11133-2021-06-09) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.2...v1.113.3) ### [`v1.113.2`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11132-httpswwwgithubcomgoogleapisjava-pubsubcomparev11131v11132-2021-06-09) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.1...v1.113.2) ### [`v1.113.1`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11131-httpswwwgithubcomgoogleapisjava-pubsubcomparev11130v11131-2021-06-07) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.0...v1.113.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index dbea5937bd5..a8f29be3b0c 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.113.0 + 1.113.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f5e55ae8f89..deb066806db 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.113.0 + 1.113.3 junit From c0dc88c6bb94b011d66f16fc1532bff285f7335c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Jun 2021 23:12:05 +0000 Subject: [PATCH 206/406] chore: release 2.4.3 (#562) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.3](https://www.github.com/googleapis/java-dlp/compare/v2.4.2...v2.4.3) (2021-06-10) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.113.3 ([#559](https://www.github.com/googleapis/java-dlp/issues/559)) ([491ee6e](https://www.github.com/googleapis/java-dlp/commit/491ee6ee22a914cd06cf5c8bf99d2b85be36e230)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index deb066806db..a2444cfc9e7 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.3-SNAPSHOT + 2.4.3 From 64b137ad862dda53699216790df97374c37a5ae7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Jun 2021 23:18:04 +0000 Subject: [PATCH 207/406] chore: release 2.4.4-SNAPSHOT (#563) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a2444cfc9e7..a0c852e5938 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.3 + 2.4.4-SNAPSHOT From 05ddb40f3e6b2ad9cbb460a03829797e50097b52 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 23 Jun 2021 21:12:42 +0200 Subject: [PATCH 208/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.7.0 (#571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.6.0` -> `20.7.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/compatibility-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/confidence-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 52ac406b34d..09f897ebd77 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.6.0 + 20.7.0 pom import From e32fe8b56969644e8ad3ee8183064c6dc6355a3e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Jul 2021 22:20:56 +0200 Subject: [PATCH 209/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.4.3 (#555) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.4.1` -> `2.4.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.3/compatibility-slim/2.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.3/confidence-slim/2.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.4.3`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​243-httpswwwgithubcomgoogleapisjava-dlpcomparev242v243-2021-06-10) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.2...v2.4.3) ### [`v2.4.2`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​242-httpswwwgithubcomgoogleapisjava-dlpcomparev241v242-2021-06-04) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.1...v2.4.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a8f29be3b0c..abc09eb144f 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.4.1 + 2.4.3 From 30f907a64c7fbc0fb07a45d28b46ef1fa429e04c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Jul 2021 22:30:49 +0200 Subject: [PATCH 210/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.113.4 (#569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.113.3` -> `1.113.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.4/compatibility-slim/1.113.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.4/confidence-slim/1.113.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.113.4`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11134-httpswwwgithubcomgoogleapisjava-pubsubcomparev11133v11134-2021-06-22) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.3...v1.113.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index abc09eb144f..3dce9c5785a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.113.3 + 1.113.4 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a0c852e5938..13243d6bf78 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.113.3 + 1.113.4 junit From e3586ba195adde851d5700b098d5aa20d259b825 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 20:18:28 +0000 Subject: [PATCH 211/406] chore: release 2.4.4 (#566) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.4](https://www.github.com/googleapis/java-dlp/compare/v2.4.3...v2.4.4) (2021-07-02) ### Bug Fixes * Add `shopt -s nullglob` to dependencies script ([#570](https://www.github.com/googleapis/java-dlp/issues/570)) ([a48d010](https://www.github.com/googleapis/java-dlp/commit/a48d0100ece21f77bf0a097668c6b928901bb97e)) * Update dependencies.sh to not break on mac ([#565](https://www.github.com/googleapis/java-dlp/issues/565)) ([b50633b](https://www.github.com/googleapis/java-dlp/commit/b50633bb19291cffce6397e687c5ceb70cb4d425)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.113.4 ([#569](https://www.github.com/googleapis/java-dlp/issues/569)) ([2f56edd](https://www.github.com/googleapis/java-dlp/commit/2f56eddaf8c2083ea243554703532e93c111a6d5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#574](https://www.github.com/googleapis/java-dlp/issues/574)) ([31110da](https://www.github.com/googleapis/java-dlp/commit/31110da3cdce9882bb98d14adc49196050ac21dd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 13243d6bf78..d169180a19f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.4-SNAPSHOT + 2.4.4 From aba33f8375efcf8f90a044d058e5860028176de2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 20:24:17 +0000 Subject: [PATCH 212/406] chore: release 2.4.5-SNAPSHOT (#576) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d169180a19f..c65b880ec74 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.4 + 2.4.5-SNAPSHOT From cd8f6cfb5fe64ab1cff00ab20facb73cd73bd614 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Jul 2021 02:16:20 +0200 Subject: [PATCH 213/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.113.5 (#578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.113.4` -> `1.113.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.5/compatibility-slim/1.113.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.5/confidence-slim/1.113.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.113.5`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11135-httpswwwgithubcomgoogleapisjava-pubsubcomparev11134v11135-2021-07-02) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.4...v1.113.5)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3dce9c5785a..a1783e4ac02 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.113.4 + 1.113.5 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c65b880ec74..afdd97251ea 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.113.4 + 1.113.5 junit From b063e2c6c586670732eea7e8bccb747e41dfead7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Jul 2021 00:24:29 +0000 Subject: [PATCH 214/406] chore: release 2.4.5 (#579) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.5](https://www.github.com/googleapis/java-dlp/compare/v2.4.4...v2.4.5) (2021-07-06) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.113.5 ([#578](https://www.github.com/googleapis/java-dlp/issues/578)) ([1a98232](https://www.github.com/googleapis/java-dlp/commit/1a982325885269d3d8ac24298dababb2e04d2f13)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index afdd97251ea..4b75c11a84a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.5-SNAPSHOT + 2.4.5 From aea284ae8102c79f38541b2085496a889a0b6a09 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Jul 2021 00:30:24 +0000 Subject: [PATCH 215/406] chore: release 2.4.6-SNAPSHOT (#581) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4b75c11a84a..ddd7bb6d5a6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.5 + 2.4.6-SNAPSHOT From d6c5d58222768d265acb4bf78f9748da485a4e94 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Jul 2021 16:38:18 +0200 Subject: [PATCH 216/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.8.0 (#585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.7.0` -> `20.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/compatibility-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/confidence-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 09f897ebd77..dc9950d8589 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.7.0 + 20.8.0 pom import From 9fd1ece7d018b2f150c1225f31f50d87a7651419 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Jul 2021 18:14:20 +0200 Subject: [PATCH 217/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.4.5 (#577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.4.3` -> `2.4.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.5/compatibility-slim/2.4.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/2.4.5/confidence-slim/2.4.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v2.4.5`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​245-httpswwwgithubcomgoogleapisjava-dlpcomparev244v245-2021-07-06) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.4...v2.4.5) ### [`v2.4.4`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​244-httpswwwgithubcomgoogleapisjava-dlpcomparev243v244-2021-07-02) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.3...v2.4.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a1783e4ac02..89cd4c23e62 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.4.3 + 2.4.5 From d37a90bdd9513b846270fbdbfcf5ab305e00a642 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 01:12:31 +0200 Subject: [PATCH 218/406] chore(deps): update dependency com.google.cloud:libraries-bom to v20.9.0 (#591) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.8.0` -> `20.9.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/compatibility-slim/20.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.9.0/confidence-slim/20.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index dc9950d8589..d3739b72a21 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.8.0 + 20.9.0 pom import From df0ffb64906dd261ad072fda914de3f71719391e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 11 Aug 2021 03:44:42 +0200 Subject: [PATCH 219/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.113.6 (#608) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.113.5` -> `1.113.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.6/compatibility-slim/1.113.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.113.6/confidence-slim/1.113.5)](https://docs.renovatebot.com/merge-confidence/) | *** ### Release Notes
googleapis/java-pubsub ### [`v1.113.6`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11136-httpswwwgithubcomgoogleapisjava-pubsubcomparev11135v11136-2021-08-06) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.5...v1.113.6)
*** ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. *** * \[ ] If you want to rebase/retry this PR, check this box. *** This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 89cd4c23e62..5808c63eb2d 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.113.5 + 1.113.6 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ddd7bb6d5a6..1194b8f62bc 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.113.5 + 1.113.6 junit From 21979a627859f03429140037100b6c2707bc2703 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 01:52:53 +0000 Subject: [PATCH 220/406] chore: release 2.4.6 (#607) :robot: I have created a release \*beep\* \*boop\* --- ### [2.4.6](https://www.github.com/googleapis/java-dlp/compare/v2.4.5...v2.4.6) (2021-08-11) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.113.6 ([#608](https://www.github.com/googleapis/java-dlp/issues/608)) ([617f002](https://www.github.com/googleapis/java-dlp/commit/617f0020c27472c68c82b57e89885f34880d2e1c)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2 ([#605](https://www.github.com/googleapis/java-dlp/issues/605)) ([175ebf4](https://www.github.com/googleapis/java-dlp/commit/175ebf48b81634a3da1a924073f811515bab1eba)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 1194b8f62bc..acd6d77c053 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.6-SNAPSHOT + 2.4.6 From ac14918bc74f84138fe4ee7ac6bc38823f3f2808 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 02:02:34 +0000 Subject: [PATCH 221/406] chore: release 2.4.7-SNAPSHOT (#609) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index acd6d77c053..9bf2cee4f2f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.6 + 2.4.7-SNAPSHOT From b22a0ba4d19d0cd9adf797797d1171312854aa53 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 11 Aug 2021 22:32:28 +0200 Subject: [PATCH 222/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.0 (#611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.113.6` -> `1.114.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.0/compatibility-slim/1.113.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.0/confidence-slim/1.113.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.0`](https://togithub.com/googleapis/java-pubsub/releases/v1.114.0) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.8...v1.114.0) ##### Features - configure initial sp version ([#​761](https://www.github.com/googleapis/java-pubsub/issues/761)) ([68c0cfb](https://www.github.com/googleapis/java-pubsub/commit/68c0cfbfe3dcb11735b8db17614500f71f482796)) ### [`v1.113.8`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11138-httpswwwgithubcomgoogleapisjava-pubsubcomparev11137v11138-2021-08-11) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.7...v1.113.8) ### [`v1.113.7`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11137-httpswwwgithubcomgoogleapisjava-pubsubcomparev11136v11137-2021-08-11) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.113.6...v1.113.7)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 5808c63eb2d..ededbd71e27 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.113.6 + 1.114.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9bf2cee4f2f..42740fb30b9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.113.6 + 1.114.0 junit From 92bac518be194e294a7c275e60c8605079a87b0b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 11 Aug 2021 22:32:51 +0200 Subject: [PATCH 223/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v2.4.6 (#610) --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index ededbd71e27..32f4bbf43e4 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.4.5 + 2.4.6 From 4df07ebb0cb85b32a77d78240960a086a7fbfe8d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 20:42:13 +0000 Subject: [PATCH 224/406] chore: release 3.0.0 (#612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## [3.0.0](https://www.github.com/googleapis/java-dlp/compare/v2.4.6...v3.0.0) (2021-08-11) ### ⚠ BREAKING CHANGES * release gapic-generator-java v2.0.0 (#604) ### Features * release gapic-generator-java v2.0.0 ([#604](https://www.github.com/googleapis/java-dlp/issues/604)) ([2e4d203](https://www.github.com/googleapis/java-dlp/commit/2e4d20384ea486ca0121ff631032211563fa5e0e)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.0 ([#611](https://www.github.com/googleapis/java-dlp/issues/611)) ([c6c802c](https://www.github.com/googleapis/java-dlp/commit/c6c802c018e1cdb17bc78643c0a0663d709601bd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 42740fb30b9..a6877502cb0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 2.4.7-SNAPSHOT + 3.0.0 From a55c4b79f17acf885d9693dc8b9a6854cae31c13 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 20:50:14 +0000 Subject: [PATCH 225/406] chore: release 3.0.1-SNAPSHOT (#615) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a6877502cb0..233610abd9f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.0 + 3.0.1-SNAPSHOT From 94bd7a84fefd3eda42145752337fba8a0032918c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 22:42:30 +0000 Subject: [PATCH 226/406] chore: release 3.0.1 (#618) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.1](https://www.github.com/googleapis/java-dlp/compare/v3.0.0...v3.0.1) (2021-08-11) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#616](https://www.github.com/googleapis/java-dlp/issues/616)) ([d53a79b](https://www.github.com/googleapis/java-dlp/commit/d53a79bd88946d458ee1caad5c237c762fe0554a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 233610abd9f..56253bff937 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.1-SNAPSHOT + 3.0.1 From 8af01fb435b25e46885dbd6a53e09d14be1cd4c2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 22:56:31 +0000 Subject: [PATCH 227/406] chore: release 3.0.2-SNAPSHOT (#620) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 56253bff937..ee2a4563ec2 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.1 + 3.0.2-SNAPSHOT From edc838dbda63e4a5634e78383a924a641f8ca654 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 17 Aug 2021 16:56:39 +0200 Subject: [PATCH 228/406] chore(deps): update dependency com.google.cloud:libraries-bom to v21 (#623) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.9.0` -> `21.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/compatibility-slim/20.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/21.0.0/confidence-slim/20.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index d3739b72a21..0f3511979c3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 20.9.0 + 21.0.0 pom import From c4d17009dd4bcf7fd36eb3c7e46661ffc84af260 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 21:22:45 +0000 Subject: [PATCH 229/406] chore: release 3.0.2 (#630) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.2](https://www.github.com/googleapis/java-dlp/compare/v3.0.1...v3.0.2) (2021-08-23) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#629](https://www.github.com/googleapis/java-dlp/issues/629)) ([3b41582](https://www.github.com/googleapis/java-dlp/commit/3b415828c78893f1d67e98cfa6f6e050c464d0c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ee2a4563ec2..949ec081067 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.2-SNAPSHOT + 3.0.2 From ed3a2108198de2789c5918dc66daac5e32fa6df1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 24 Aug 2021 19:12:24 +0200 Subject: [PATCH 230/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.1 (#632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.0` -> `1.114.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.1/compatibility-slim/1.114.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.1/confidence-slim/1.114.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.1`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11141-httpswwwgithubcomgoogleapisjava-pubsubcomparev11140v11141-2021-08-23) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.0...v1.114.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 32f4bbf43e4..6095240d9f4 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.0 + 1.114.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 949ec081067..d035d006c51 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.0 + 1.114.1 junit From 915cbc9974404886b1866b90dc413d7a34a8541d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 27 Aug 2021 17:01:11 +0200 Subject: [PATCH 231/406] chore(deps): update dependency com.google.cloud:libraries-bom to v22 (#640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `21.0.0` -> `22.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/compatibility-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/confidence-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 0f3511979c3..e57350272d4 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 21.0.0 + 22.0.0 pom import From 2c53baaf70993514a49ba6e9af74acd722a0357f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 00:08:31 +0200 Subject: [PATCH 232/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.2 (#636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.1` -> `1.114.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.2/compatibility-slim/1.114.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.2/confidence-slim/1.114.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.2`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11142-httpswwwgithubcomgoogleapisjava-pubsubcomparev11141v11142-2021-08-24) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.1...v1.114.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 6095240d9f4..dfd83cc3b35 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.1 + 1.114.2 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d035d006c51..6077fa896d2 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.1 + 1.114.2 junit From 9265a60faa1c09816eaa8a0016966f512d19ab8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 00:18:44 +0200 Subject: [PATCH 233/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3 (#617) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `2.4.6` -> `3.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.2/compatibility-slim/2.4.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.2/confidence-slim/2.4.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.2`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​302-httpswwwgithubcomgoogleapisjava-dlpcomparev301v302-2021-08-23) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.1...v3.0.2) ### [`v3.0.1`](https://togithub.com/googleapis/java-dlp/compare/v3.0.0...v3.0.1) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.0...v3.0.1) ### [`v3.0.0`](https://togithub.com/googleapis/java-dlp/compare/v2.4.6...v3.0.0) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v2.4.6...v3.0.0)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index dfd83cc3b35..0b03b6f9b8b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 2.4.6 + 3.0.2 From 4a9a79f03c68355f907634cbd7d83295aba4b959 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 00:24:43 +0000 Subject: [PATCH 234/406] chore: release 3.0.3-SNAPSHOT (#631) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6077fa896d2..70951028c66 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.2 + 3.0.3-SNAPSHOT From 5e1ad59372f4d362fa479f33b5171a6d2eff20b7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 00:30:26 +0000 Subject: [PATCH 235/406] chore: release 3.0.3 (#645) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.3](https://www.github.com/googleapis/java-dlp/compare/v3.0.2...v3.0.3) (2021-09-01) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.1 ([#632](https://www.github.com/googleapis/java-dlp/issues/632)) ([eaa725d](https://www.github.com/googleapis/java-dlp/commit/eaa725dcd9df341890e1da49568d801af2b376af)) * update dependency com.google.cloud:google-cloud-pubsub to v1.114.2 ([#636](https://www.github.com/googleapis/java-dlp/issues/636)) ([9d39ba7](https://www.github.com/googleapis/java-dlp/commit/9d39ba766602fda634dcb3eb63ba46ff355336f7)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#642](https://www.github.com/googleapis/java-dlp/issues/642)) ([7b92659](https://www.github.com/googleapis/java-dlp/commit/7b9265988321d778d6e00395dab25e1429e49428)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 70951028c66..95ea4794bd4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.3-SNAPSHOT + 3.0.3 From 65029af1115d9dfe406819846d2a68b02f016887 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Sep 2021 00:36:28 +0000 Subject: [PATCH 236/406] chore: release 3.0.4-SNAPSHOT (#646) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 95ea4794bd4..018531e99b9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.3 + 3.0.4-SNAPSHOT From 158d190fb4fbf45955a552c3d9918f7f4e7179bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 17:44:15 +0200 Subject: [PATCH 237/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.3 (#647) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.2` -> `3.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.3/compatibility-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.3/confidence-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.3`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​303-httpswwwgithubcomgoogleapisjava-dlpcomparev302v303-2021-09-01) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.2...v3.0.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0b03b6f9b8b..99d6d3730b9 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.2 + 3.0.3 From 8d71a994bd4c4be5c3a5ef0aae588eb16dcbaf95 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Sep 2021 18:06:24 +0200 Subject: [PATCH 238/406] chore(deps): update dependency com.google.cloud:libraries-bom to v23 (#656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `22.0.0` -> `23.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/compatibility-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/confidence-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index e57350272d4..5b4f40483a3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import From b54bd3aaa69398c0b1eb05af152e83cd8d61987b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Sep 2021 22:05:01 +0200 Subject: [PATCH 239/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.3 (#653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.2` -> `1.114.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.3/compatibility-slim/1.114.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.3/confidence-slim/1.114.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.3`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11143-httpswwwgithubcomgoogleapisjava-pubsubcomparev11142v11143-2021-08-31) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.2...v1.114.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 99d6d3730b9..a13aadd942e 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.2 + 1.114.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 018531e99b9..d3882755dbe 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.2 + 1.114.3 junit From 0ea4e87c0bfa5813f85aba257658283fc3195dbd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 20:27:19 +0000 Subject: [PATCH 240/406] chore: release 3.0.4 (#662) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.4](https://www.github.com/googleapis/java-dlp/compare/v3.0.3...v3.0.4) (2021-09-13) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.3 ([#653](https://www.github.com/googleapis/java-dlp/issues/653)) ([1953599](https://www.github.com/googleapis/java-dlp/commit/19535990c1b46bda86b579e11b0341fbdcb8b62b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d3882755dbe..838143d3cf0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.4-SNAPSHOT + 3.0.4 From 48dc9ddb0055f76a8905af608b5704868713fca2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 20:41:06 +0000 Subject: [PATCH 241/406] chore: release 3.0.5-SNAPSHOT (#663) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 838143d3cf0..5181c12e031 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.4 + 3.0.5-SNAPSHOT From f74609686162de41bc05b343ca5af0a4d1ac71da Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Sep 2021 02:30:32 +0000 Subject: [PATCH 242/406] chore: release 3.0.5 (#667) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.5](https://www.github.com/googleapis/java-dlp/compare/v3.0.4...v3.0.5) (2021-09-14) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#665](https://www.github.com/googleapis/java-dlp/issues/665)) ([d0218cc](https://www.github.com/googleapis/java-dlp/commit/d0218cc2b243d5b3a93fdd1f66aeeae96fb4b7cb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 5181c12e031..b9b607cbb52 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.5-SNAPSHOT + 3.0.5 From 39f5809ed6aa0516fb5b64af337cbb8bbe505cdc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Sep 2021 02:36:27 +0000 Subject: [PATCH 243/406] chore: release 3.0.6-SNAPSHOT (#668) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index b9b607cbb52..212158ee9b4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.5 + 3.0.6-SNAPSHOT From a72d285de6ca7b80bdbf683d1df04db3ec30a1c7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Sep 2021 22:01:30 +0200 Subject: [PATCH 244/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.4 (#664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.3` -> `3.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.4/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.4/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.4`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​304-httpswwwgithubcomgoogleapisjava-dlpcomparev303v304-2021-09-13) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.3...v3.0.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a13aadd942e..adec2862e6a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.3 + 3.0.4 From abaa7bf34f07750d95cde83637ee0182dc576024 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Sep 2021 22:01:34 +0200 Subject: [PATCH 245/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.4 (#669) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.3` -> `1.114.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.4/compatibility-slim/1.114.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.4/confidence-slim/1.114.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.4`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11144-httpswwwgithubcomgoogleapisjava-pubsubcomparev11143v11144-2021-09-17) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.3...v1.114.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index adec2862e6a..9635c344ea3 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.3 + 1.114.4 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 212158ee9b4..733ebf7fdf0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.3 + 1.114.4 junit From c5830a6edac52e9e692c8bdf18ce0dedb924c6de Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 20:10:35 +0000 Subject: [PATCH 246/406] chore: release 3.0.6 (#671) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.6](https://www.github.com/googleapis/java-dlp/compare/v3.0.5...v3.0.6) (2021-09-20) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.4 ([#669](https://www.github.com/googleapis/java-dlp/issues/669)) ([0cbb682](https://www.github.com/googleapis/java-dlp/commit/0cbb6827aa54378c6f3a797f94e7d77353bb324a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 733ebf7fdf0..81bb1d25f4c 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.6-SNAPSHOT + 3.0.6 From ede4022d325dc23a68824498d67b365e35463cf9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 20:16:37 +0000 Subject: [PATCH 247/406] chore: release 3.0.7-SNAPSHOT (#672) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 81bb1d25f4c..fdb223a5680 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.6 + 3.0.7-SNAPSHOT From 00c2b7b95dfaf68c0fd24ed8551a0d7082dbf39c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:30:38 +0000 Subject: [PATCH 248/406] chore: release 3.0.7 (#676) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.7](https://www.github.com/googleapis/java-dlp/compare/v3.0.6...v3.0.7) (2021-09-22) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#675](https://www.github.com/googleapis/java-dlp/issues/675)) ([7575661](https://www.github.com/googleapis/java-dlp/commit/7575661ad5b060ba1666b1cf010600ab633ad79b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index fdb223a5680..e02f40196eb 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.7-SNAPSHOT + 3.0.7 From e0d5751d3c388077b5e18181366040a6a42a2f7e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:40:37 +0000 Subject: [PATCH 249/406] chore: release 3.0.8-SNAPSHOT (#677) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e02f40196eb..28828144ba3 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.7 + 3.0.8-SNAPSHOT From a206257d58daa74396fd463f466f8803b5cb1b8f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Sep 2021 02:50:18 +0200 Subject: [PATCH 250/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.7 (#670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.4` -> `3.0.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.7/compatibility-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.7/confidence-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.7`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​307-httpswwwgithubcomgoogleapisjava-dlpcomparev306v307-2021-09-22) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.6...v3.0.7) ### [`v3.0.6`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​306-httpswwwgithubcomgoogleapisjava-dlpcomparev305v306-2021-09-20) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.5...v3.0.6) ### [`v3.0.5`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​305-httpswwwgithubcomgoogleapisjava-dlpcomparev304v305-2021-09-14) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.4...v3.0.5)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9635c344ea3..62eed60ae26 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.4 + 3.0.7 From 1854b5e36c015f584075a01804cac1251c8004e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 29 Sep 2021 18:44:31 +0200 Subject: [PATCH 251/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.5 (#684) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.4` -> `1.114.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.5/compatibility-slim/1.114.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.5/confidence-slim/1.114.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.5`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11145-httpswwwgithubcomgoogleapisjava-pubsubcomparev11144v11145-2021-09-27) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.4...v1.114.5)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 62eed60ae26..5b75902d73e 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.4 + 1.114.5 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 28828144ba3..4f53d4101f9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.4 + 1.114.5 junit From 44ce8a0992a78556c63de0a35d31f0c45c5f314d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Sep 2021 16:50:44 +0000 Subject: [PATCH 252/406] chore: release 3.0.8 (#685) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.8](https://www.github.com/googleapis/java-dlp/compare/v3.0.7...v3.0.8) (2021-09-29) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.5 ([#684](https://www.github.com/googleapis/java-dlp/issues/684)) ([3a2377a](https://www.github.com/googleapis/java-dlp/commit/3a2377a4f54d5c84e023dbc08c2c40853a5f9067)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4f53d4101f9..d308482909b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.8-SNAPSHOT + 3.0.8 From 023506b13e3da44588d3882c470f8d4d284c7a6f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Sep 2021 16:56:42 +0000 Subject: [PATCH 253/406] chore: release 3.0.9-SNAPSHOT (#686) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d308482909b..e1a2d99394b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.8 + 3.0.9-SNAPSHOT From 74e08135b39b723c8754f647fc70ab8fe35cde0d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 16:38:55 +0200 Subject: [PATCH 254/406] chore(deps): update dependency com.google.cloud:libraries-bom to v23.1.0 (#689) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v23.1.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 5b4f40483a3..4bf1467cdf9 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 23.0.0 + 23.1.0 pom import From 65eca6aa07a6397961c3be656372c1c17001bf74 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 16:52:53 +0200 Subject: [PATCH 255/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.8 (#687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.7` -> `3.0.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.8/compatibility-slim/3.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.8/confidence-slim/3.0.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.8`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​308-httpswwwgithubcomgoogleapisjava-dlpcomparev307v308-2021-09-29) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.7...v3.0.8)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 5b75902d73e..a61ff854f07 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.7 + 3.0.8 From 00f1211d604d8590c3bab4c94c432d0603bc8a6e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Oct 2021 17:34:30 +0200 Subject: [PATCH 256/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.6 (#690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.5` -> `1.114.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.6/compatibility-slim/1.114.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.6/confidence-slim/1.114.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.6`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11146-httpswwwgithubcomgoogleapisjava-pubsubcomparev11145v11146-2021-10-05) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.5...v1.114.6)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a61ff854f07..d60a28c0ffd 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.5 + 1.114.6 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e1a2d99394b..cffc796f32b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.5 + 1.114.6 junit From 845fc803f6093d8ebc60b98c7352ab76d4f57083 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 15:54:13 +0000 Subject: [PATCH 257/406] chore: release 3.0.9 (#692) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.9](https://www.github.com/googleapis/java-dlp/compare/v3.0.8...v3.0.9) (2021-10-13) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.6 ([#690](https://www.github.com/googleapis/java-dlp/issues/690)) ([2175a2e](https://www.github.com/googleapis/java-dlp/commit/2175a2e6b32d9cd2e476b151bdf2111f9939b920)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index cffc796f32b..44134390a4b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.9-SNAPSHOT + 3.0.9 From e37525ebfcbeb70db1dd6b92105b90bc33b0ad78 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Oct 2021 16:00:17 +0000 Subject: [PATCH 258/406] chore: release 3.0.10-SNAPSHOT (#694) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 44134390a4b..949bfa1104d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.9 + 3.0.10-SNAPSHOT From f1026fbd7917d4b3c6be08e236da51d6d5511278 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Oct 2021 23:56:33 +0200 Subject: [PATCH 259/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.9 (#695) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.8` -> `3.0.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.9/compatibility-slim/3.0.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.9/confidence-slim/3.0.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.9`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​309-httpswwwgithubcomgoogleapisjava-dlpcomparev308v309-2021-10-13) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.8...v3.0.9)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d60a28c0ffd..fb84ac6bbf8 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.8 + 3.0.9 From 551eff75612d33dc554bcabf6f96b154c3327c43 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 02:50:35 +0000 Subject: [PATCH 260/406] chore: release 3.0.10 (#699) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.10](https://www.github.com/googleapis/java-dlp/compare/v3.0.9...v3.0.10) (2021-10-19) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#698](https://www.github.com/googleapis/java-dlp/issues/698)) ([f612bef](https://www.github.com/googleapis/java-dlp/commit/f612bef2058474d4866110b2602bf6a83a2e0b17)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 949bfa1104d..e54280f176e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.10-SNAPSHOT + 3.0.10 From e73b5c1cce3fb703b8e423654cd8792a133f7941 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 02:56:18 +0000 Subject: [PATCH 261/406] chore: release 3.0.11-SNAPSHOT (#700) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e54280f176e..6b0ea8178a4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.10 + 3.0.11-SNAPSHOT From 3915227850817342a40fd82aaa0e501e1c028e69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Oct 2021 17:26:14 +0200 Subject: [PATCH 262/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.10 (#701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.9` -> `3.0.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.10/compatibility-slim/3.0.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.10/confidence-slim/3.0.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.10`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​3010-httpswwwgithubcomgoogleapisjava-dlpcomparev309v3010-2021-10-19) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.9...v3.0.10)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index fb84ac6bbf8..a71d1e6dae2 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.9 + 3.0.10 From 531e95ac9c50cec088bfdc940c5def1cab728369 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 20 Oct 2021 17:18:50 +0200 Subject: [PATCH 263/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.114.7 (#702) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.114.6` -> `1.114.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.7/compatibility-slim/1.114.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.114.7/confidence-slim/1.114.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.114.7`](https://togithub.com/googleapis/java-pubsub/blob/master/CHANGELOG.md#​11147-httpswwwgithubcomgoogleapisjava-pubsubcomparev11146v11147-2021-10-19) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.114.6...v1.114.7)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a71d1e6dae2..474fe5af381 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.6 + 1.114.7 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6b0ea8178a4..0cc9ddb86a7 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.6 + 1.114.7 junit From 8f803d1aba1916768259248e0649ab8648abf066 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 15:34:21 +0000 Subject: [PATCH 264/406] chore: release 3.0.11 (#703) :robot: I have created a release \*beep\* \*boop\* --- ### [3.0.11](https://www.github.com/googleapis/java-dlp/compare/v3.0.10...v3.0.11) (2021-10-20) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.114.7 ([#702](https://www.github.com/googleapis/java-dlp/issues/702)) ([f3a7ca0](https://www.github.com/googleapis/java-dlp/commit/f3a7ca0af5d39832aa79162bebc0b5f3cdc926cc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 0cc9ddb86a7..38760dc32ec 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.11-SNAPSHOT + 3.0.11 From e29d68e91aa348fa79b509f7d24922184453ebd2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 15:42:26 +0000 Subject: [PATCH 265/406] chore: release 3.0.12-SNAPSHOT (#704) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 38760dc32ec..2130f48a1b0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.11 + 3.0.12-SNAPSHOT From 23d32784784ff48a1ea4b9ec2c29e7b26f854a5b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Oct 2021 19:10:23 +0200 Subject: [PATCH 266/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.0.11 (#705) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.10` -> `3.0.11` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.11/compatibility-slim/3.0.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.0.11/confidence-slim/3.0.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.0.11`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​3011-httpswwwgithubcomgoogleapisjava-dlpcomparev3010v3011-2021-10-20) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.10...v3.0.11)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 474fe5af381..a2cb10c6414 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.10 + 3.0.11 From 10e1727d3b885001dac9510d6fb9883d15688cdc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 18:18:50 +0200 Subject: [PATCH 267/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24 (#709) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `23.1.0` -> `24.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/compatibility-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/confidence-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 4bf1467cdf9..1816c2a0d7d 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import From 2ccb5eb1bd2c8400682c6c7c765693842e97c079 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 21:58:12 +0000 Subject: [PATCH 268/406] chore: release 3.1.0 (#708) :robot: I have created a release \*beep\* \*boop\* --- ## [3.1.0](https://www.github.com/googleapis/java-dlp/compare/v3.0.11...v3.1.0) (2021-12-03) ### Features * added deidentify replacement dictionaries ([#722](https://www.github.com/googleapis/java-dlp/issues/722)) ([7d4f8cb](https://www.github.com/googleapis/java-dlp/commit/7d4f8cbfbcec9c382af09a0b07fc9a4b074593bc)) ### Bug Fixes * **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-dlp/issues/1266)) ([#707](https://www.github.com/googleapis/java-dlp/issues/707)) ([52e6796](https://www.github.com/googleapis/java-dlp/commit/52e679630b817ebb796245f776e30e470bf02c41)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#717](https://www.github.com/googleapis/java-dlp/issues/717)) ([332c9d2](https://www.github.com/googleapis/java-dlp/commit/332c9d24f2bcd2080bd867b4dd9bfa793018710c)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#723](https://www.github.com/googleapis/java-dlp/issues/723)) ([6b9b590](https://www.github.com/googleapis/java-dlp/commit/6b9b590df73a87b68b7b3e2d1f9e755235d6154d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2130f48a1b0..71ec2aea331 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.0.12-SNAPSHOT + 3.1.0 From 2d620404abcabb6d6131a0c6f827bd596b748295 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 22:04:18 +0000 Subject: [PATCH 269/406] chore: release 3.1.1-SNAPSHOT (#724) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 71ec2aea331..14867531342 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.0 + 3.1.1-SNAPSHOT From e067bec9bade3791cda7e2bdb0adce71ef26fc90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Dec 2021 23:36:16 +0100 Subject: [PATCH 270/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.0 (#725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.0.11` -> `3.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.0/compatibility-slim/3.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.0/confidence-slim/3.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.1.0`](https://togithub.com/googleapis/java-dlp/blob/master/CHANGELOG.md#​310-httpswwwgithubcomgoogleapisjava-dlpcomparev3011v310-2021-12-03) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.0.11...v3.1.0) ##### Features - added deidentify replacement dictionaries ([#​722](https://www.togithub.com/googleapis/java-dlp/issues/722)) ([7d4f8cb](https://www.github.com/googleapis/java-dlp/commit/7d4f8cbfbcec9c382af09a0b07fc9a4b074593bc)) ##### Bug Fixes - **java:** java 17 dependency arguments ([#​1266](https://www.togithub.com/googleapis/java-dlp/issues/1266)) ([#​707](https://www.togithub.com/googleapis/java-dlp/issues/707)) ([52e6796](https://www.github.com/googleapis/java-dlp/commit/52e679630b817ebb796245f776e30e470bf02c41)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#​717](https://www.togithub.com/googleapis/java-dlp/issues/717)) ([332c9d2](https://www.github.com/googleapis/java-dlp/commit/332c9d24f2bcd2080bd867b4dd9bfa793018710c)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#​723](https://www.togithub.com/googleapis/java-dlp/issues/723)) ([6b9b590](https://www.github.com/googleapis/java-dlp/commit/6b9b590df73a87b68b7b3e2d1f9e755235d6154d)) ##### [3.0.11](https://www.github.com/googleapis/java-dlp/compare/v3.0.10...v3.0.11) (2021-10-20) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.7 ([#​702](https://www.togithub.com/googleapis/java-dlp/issues/702)) ([f3a7ca0](https://www.github.com/googleapis/java-dlp/commit/f3a7ca0af5d39832aa79162bebc0b5f3cdc926cc)) ##### [3.0.10](https://www.github.com/googleapis/java-dlp/compare/v3.0.9...v3.0.10) (2021-10-19) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#​698](https://www.togithub.com/googleapis/java-dlp/issues/698)) ([f612bef](https://www.github.com/googleapis/java-dlp/commit/f612bef2058474d4866110b2602bf6a83a2e0b17)) ##### [3.0.9](https://www.github.com/googleapis/java-dlp/compare/v3.0.8...v3.0.9) (2021-10-13) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.6 ([#​690](https://www.togithub.com/googleapis/java-dlp/issues/690)) ([2175a2e](https://www.github.com/googleapis/java-dlp/commit/2175a2e6b32d9cd2e476b151bdf2111f9939b920)) ##### [3.0.8](https://www.github.com/googleapis/java-dlp/compare/v3.0.7...v3.0.8) (2021-09-29) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.5 ([#​684](https://www.togithub.com/googleapis/java-dlp/issues/684)) ([3a2377a](https://www.github.com/googleapis/java-dlp/commit/3a2377a4f54d5c84e023dbc08c2c40853a5f9067)) ##### [3.0.7](https://www.github.com/googleapis/java-dlp/compare/v3.0.6...v3.0.7) (2021-09-22) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#​675](https://www.togithub.com/googleapis/java-dlp/issues/675)) ([7575661](https://www.github.com/googleapis/java-dlp/commit/7575661ad5b060ba1666b1cf010600ab633ad79b)) ##### [3.0.6](https://www.github.com/googleapis/java-dlp/compare/v3.0.5...v3.0.6) (2021-09-20) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.4 ([#​669](https://www.togithub.com/googleapis/java-dlp/issues/669)) ([0cbb682](https://www.github.com/googleapis/java-dlp/commit/0cbb6827aa54378c6f3a797f94e7d77353bb324a)) ##### [3.0.5](https://www.github.com/googleapis/java-dlp/compare/v3.0.4...v3.0.5) (2021-09-14) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#​665](https://www.togithub.com/googleapis/java-dlp/issues/665)) ([d0218cc](https://www.github.com/googleapis/java-dlp/commit/d0218cc2b243d5b3a93fdd1f66aeeae96fb4b7cb)) ##### [3.0.4](https://www.github.com/googleapis/java-dlp/compare/v3.0.3...v3.0.4) (2021-09-13) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.3 ([#​653](https://www.togithub.com/googleapis/java-dlp/issues/653)) ([1953599](https://www.github.com/googleapis/java-dlp/commit/19535990c1b46bda86b579e11b0341fbdcb8b62b)) ##### [3.0.3](https://www.github.com/googleapis/java-dlp/compare/v3.0.2...v3.0.3) (2021-09-01) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.114.1 ([#​632](https://www.togithub.com/googleapis/java-dlp/issues/632)) ([eaa725d](https://www.github.com/googleapis/java-dlp/commit/eaa725dcd9df341890e1da49568d801af2b376af)) - update dependency com.google.cloud:google-cloud-pubsub to v1.114.2 ([#​636](https://www.togithub.com/googleapis/java-dlp/issues/636)) ([9d39ba7](https://www.github.com/googleapis/java-dlp/commit/9d39ba766602fda634dcb3eb63ba46ff355336f7)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#​642](https://www.togithub.com/googleapis/java-dlp/issues/642)) ([7b92659](https://www.github.com/googleapis/java-dlp/commit/7b9265988321d778d6e00395dab25e1429e49428)) ##### [3.0.2](https://www.github.com/googleapis/java-dlp/compare/v3.0.1...v3.0.2) (2021-08-23) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#​629](https://www.togithub.com/googleapis/java-dlp/issues/629)) ([3b41582](https://www.github.com/googleapis/java-dlp/commit/3b415828c78893f1d67e98cfa6f6e050c464d0c1)) ##### [3.0.1](https://www.github.com/googleapis/java-dlp/compare/v3.0.0...v3.0.1) (2021-08-11) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#​616](https://www.togithub.com/googleapis/java-dlp/issues/616)) ([d53a79b](https://www.github.com/googleapis/java-dlp/commit/d53a79bd88946d458ee1caad5c237c762fe0554a))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a2cb10c6414..500f8e9fa5d 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.0.11 + 3.1.0 From d7c562c1996b70c0f4731824390b534a434e09c1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 00:05:23 +0100 Subject: [PATCH 271/406] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.2.0 (#721) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- dlp/snippets/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 500f8e9fa5d..387b40f0876 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 91a9cf17a74..b3fce4886f4 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 14867531342..7796dad7f09 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 1816c2a0d7d..3d895c653d0 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 From 6659b1d93ab2bad086ced76f14cf64f4205fc925 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 19:43:38 +0100 Subject: [PATCH 272/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.115.0 (#728) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 387b40f0876..25a7ec5617d 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.114.7 + 1.115.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7796dad7f09..0db9349f626 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.114.7 + 1.115.0 junit From fd3c1ec0afef4d575ebb63d91338821ad2d97875 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Dec 2021 00:10:31 +0100 Subject: [PATCH 273/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.0 (#766) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.0.0` -> `24.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/confidence-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 3d895c653d0..b75bf60fa8a 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.0.0 + 24.1.0 pom import From 2f6763bbddeb45e330ae1e71208ce02b644080b5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Dec 2021 21:46:24 +0100 Subject: [PATCH 274/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.1 (#778) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.0` -> `24.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/compatibility-slim/24.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/confidence-slim/24.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index b75bf60fa8a..e644fa2164f 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.0 + 24.1.1 pom import From 64fea103cb994188d38476a61c84f888fe1f3d0f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Jan 2022 04:20:39 +0100 Subject: [PATCH 275/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.2 (#786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.1` -> `24.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/compatibility-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/confidence-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index e644fa2164f..a079d1d08ca 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.1 + 24.1.2 pom import From 8d8121e9279e4eddeb22feff3358b7d2ce61e675 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Jan 2022 13:30:57 -0500 Subject: [PATCH 276/406] chore: release 3.1.1 (#727) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 0db9349f626..746f0ac8698 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.1-SNAPSHOT + 3.1.1 From 23ce81f5ee00b5261f2e25ea88350bd7f135cfa7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Jan 2022 18:54:11 +0000 Subject: [PATCH 277/406] chore: release 3.1.2-SNAPSHOT (#790) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 746f0ac8698..9412aa5bfa5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.1 + 3.1.2-SNAPSHOT From 6841e4ce9bba85f920b93250b0cbf2017a68088a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 17 Jan 2022 19:18:23 +0100 Subject: [PATCH 278/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.1 (#792) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.1.0` -> `3.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.1/compatibility-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.1/confidence-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.1.1`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​311-httpswwwgithubcomgoogleapisjava-dlpcomparev310v311-2022-01-07) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.1.0...v3.1.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 25a7ec5617d..9038621ce41 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.1.0 + 3.1.1 From 1b151febe55a69d47c6b7078c8093ba14b1a1afe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Jan 2022 19:58:34 +0100 Subject: [PATCH 279/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.2.0 (#799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.2` -> `24.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.2.0/compatibility-slim/24.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.2.0/confidence-slim/24.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index a079d1d08ca..1d41e06efde 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.2 + 24.2.0 pom import From 2de59159e3915fe40d7aeef6ffafe43e5552d799 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Jan 2022 20:14:24 +0100 Subject: [PATCH 280/406] build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.3.0 (#789) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.mojo:build-helper-maven-plugin](http://www.mojohaus.org/build-helper-maven-plugin/) ([source](https://togithub.com/mojohaus/build-helper-maven-plugin)) | `3.2.0` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9038621ce41..539c23059f9 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -58,7 +58,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9412aa5bfa5..a523d934532 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -57,7 +57,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source From 79b412c43e66bee6d35d3319ac9be32755224d70 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 00:04:13 +0100 Subject: [PATCH 281/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.115.1 (#793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.115.0` -> `1.115.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.1/compatibility-slim/1.115.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.1/confidence-slim/1.115.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.115.1`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11151-httpswwwgithubcomgoogleapisjava-pubsubcomparev11150v11151-2022-01-07) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.115.0...v1.115.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 539c23059f9..d7006cdd785 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.115.0 + 1.115.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a523d934532..9d0233ad4a9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.115.0 + 1.115.1 junit From 8ec2ce422d7d4ab86fc8d7e350ba3b9045807a06 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 21:06:44 +0000 Subject: [PATCH 282/406] chore(main): release 3.1.2 (#803) :robot: I have created a release *beep* *boop* --- ### [3.1.2](https://github.com/googleapis/java-dlp/compare/v3.1.1...v3.1.2) (2022-02-03) ### Dependencies * **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-dlp/issues/1339)) ([#806](https://github.com/googleapis/java-dlp/issues/806)) ([3f0d2b5](https://github.com/googleapis/java-dlp/commit/3f0d2b5acc036d1a4be5f1ca708d5fd3181fa86e)) * update actions/github-script action to v5 ([#805](https://github.com/googleapis/java-dlp/issues/805)) ([b4cf05f](https://github.com/googleapis/java-dlp/commit/b4cf05f2b4969bb4365ec2159cbd0297a837ab36)) * update dependency com.google.cloud:google-cloud-pubsub to v1.115.1 ([#793](https://github.com/googleapis/java-dlp/issues/793)) ([c524a47](https://github.com/googleapis/java-dlp/commit/c524a4712df8a8bee105e6470788c8e3a0bfa241)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#809](https://github.com/googleapis/java-dlp/issues/809)) ([9b8c0f7](https://github.com/googleapis/java-dlp/commit/9b8c0f7ce2e843013d4b0872c9b6b4b5201a2110)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 9d0233ad4a9..25ef68b2f42 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.2-SNAPSHOT + 3.1.2 From 08ca7322267aa4ff55d660b16de7461ac23336fa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 01:24:45 +0000 Subject: [PATCH 283/406] chore(main): release 3.1.3-SNAPSHOT (#811) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 25ef68b2f42..c69041a4a58 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.2 + 3.1.3-SNAPSHOT From b970777d8d0b7d790d4e5db98ba671fafcc027ef Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Feb 2022 23:04:45 +0100 Subject: [PATCH 284/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.3.0 (#819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.2.0` -> `24.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/compatibility-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.3.0/confidence-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 1d41e06efde..b849467abf3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.2.0 + 24.3.0 pom import From 0941652b75b21d5e82dc3cf5be0af71d17e7c30b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 22:51:03 +0100 Subject: [PATCH 285/406] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.9 (#823) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.8` -> `1.6.9` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/compatibility-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/confidence-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index b3fce4886f4..3aa40edf9ef 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.9 true From 6e1b0412e7ac975174e0460fdb95f86977c3cf03 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Feb 2022 17:49:19 +0100 Subject: [PATCH 286/406] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.10 (#824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.9` -> `1.6.10` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/compatibility-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/confidence-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.10`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 3aa40edf9ef..ec24a747384 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.9 + 1.6.10 true From 6bd5725544f4c4ff38a70a388bac36babdb1ca77 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Feb 2022 16:36:51 +0100 Subject: [PATCH 287/406] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.11 (#825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.10` -> `1.6.11` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/compatibility-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/confidence-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.11`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index ec24a747384..3d01cdf50be 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true From 793fd9015ba8497c6d4214562775608cd094e372 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 19:24:45 +0100 Subject: [PATCH 288/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.115.2 (#813) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:google-cloud-pubsub to v1.115.2 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d7006cdd785..5402b10adca 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.115.1 + 1.115.2 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c69041a4a58..ccf534987f5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.115.1 + 1.115.2 junit From e311983abb8c71d8ede48f9d76fa9d6e8da20637 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 19:24:53 +0100 Subject: [PATCH 289/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.2 (#812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.2 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 5402b10adca..f9e69d87383 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.1.1 + 3.1.2 From 464b124dba094e379910e4345c018e8a2cef578d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 18:32:22 +0000 Subject: [PATCH 290/406] chore(main): release 3.1.3 (#822) :robot: I have created a release *beep* *boop* --- ### [3.1.3](https://github.com/googleapis/java-dlp/compare/v3.1.2...v3.1.3) (2022-03-01) ### Dependencies * update actions/github-script action to v6 ([#821](https://github.com/googleapis/java-dlp/issues/821)) ([f3c0dff](https://github.com/googleapis/java-dlp/commit/f3c0dffc09b21efb98b439ce6a5a43522eff6076)) * update actions/setup-java action to v3 ([#827](https://github.com/googleapis/java-dlp/issues/827)) ([4e3e43e](https://github.com/googleapis/java-dlp/commit/4e3e43e0e75df8dd232d1a59136bc853ab6ac8d5)) * update dependency com.google.cloud:google-cloud-pubsub to v1.115.2 ([#813](https://github.com/googleapis/java-dlp/issues/813)) ([898f8f8](https://github.com/googleapis/java-dlp/commit/898f8f80376c36997b84f7b279ec80bc4c37072c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ccf534987f5..b22c3e61b86 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.3-SNAPSHOT + 3.1.3 From 1a15784957fe71d592c4d48d362420ba0ccc10ff Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 18:40:16 +0000 Subject: [PATCH 291/406] chore(main): release 3.1.4-SNAPSHOT (#829) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index b22c3e61b86..81707f963ea 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.3 + 3.1.4-SNAPSHOT From d56fc7364d5e8778dd52aaff7f3f8d2f0de334a9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 02:36:40 +0100 Subject: [PATCH 292/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.3 (#831) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.1.2` -> `3.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.3/compatibility-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.1.3/confidence-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.1.3`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​313-httpsgithubcomgoogleapisjava-dlpcomparev312v313-2022-03-01) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.1.2...v3.1.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index f9e69d87383..1d7874c6723 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.1.2 + 3.1.3 From df99a91b122d9297b938cd400dc17bd214dee9b2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 02:38:21 +0100 Subject: [PATCH 293/406] chore(deps): update dependency com.google.cloud:libraries-bom to v24.4.0 (#836) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.3.0` -> `24.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/compatibility-slim/24.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/confidence-slim/24.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index b849467abf3..afdd35902af 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import From 1a7f98ae46d594022fd4d712ee9e1cf95925dc5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 02:44:31 +0100 Subject: [PATCH 294/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.115.5 (#832) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.115.2` -> `1.115.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.5/compatibility-slim/1.115.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.115.5/confidence-slim/1.115.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.115.5`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11155-httpsgithubcomgoogleapisjava-pubsubcomparev11154v11155-2022-02-11) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.115.4...v1.115.5) ### [`v1.115.4`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11154-httpsgithubcomgoogleapisjava-pubsubcomparev11153v11154-2022-02-10) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.115.3...v1.115.4) ### [`v1.115.3`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11153-httpsgithubcomgoogleapisjava-pubsubcomparev11152v11153-2022-02-08) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.115.2...v1.115.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 1d7874c6723..bc2393de7c2 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.115.2 + 1.115.5 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 81707f963ea..a65608b3296 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.115.2 + 1.115.5 junit From 8aa31a4f154f4c9da6b632708ee2d55b3cd26603 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 02:06:29 +0000 Subject: [PATCH 295/406] chore(main): release 3.1.4 (#837) :robot: I have created a release *beep* *boop* --- ### [3.1.4](https://github.com/googleapis/java-dlp/compare/v3.1.3...v3.1.4) (2022-03-03) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.115.5 ([#832](https://github.com/googleapis/java-dlp/issues/832)) ([5c95fb4](https://github.com/googleapis/java-dlp/commit/5c95fb4b3c34fc03312108e9f07256d7e323645d)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#835](https://github.com/googleapis/java-dlp/issues/835)) ([ba0a7b1](https://github.com/googleapis/java-dlp/commit/ba0a7b180d0e02aeb1c8e542eee3efc231e2971b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a65608b3296..3dbed01dcc2 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.4-SNAPSHOT + 3.1.4 From f5467b4962cb9508457b27fe3ea45b530dd4ce40 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 02:16:27 +0000 Subject: [PATCH 296/406] chore(main): release 3.1.5-SNAPSHOT (#839) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 3dbed01dcc2..909c8208e04 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.4 + 3.1.5-SNAPSHOT From d436e0f5361a89c4db791743e0e7bf34cf087065 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Mar 2022 22:56:20 +0100 Subject: [PATCH 297/406] chore(deps): update dependency com.google.cloud:libraries-bom to v25 (#845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.4.0` -> `25.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/compatibility-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/confidence-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index afdd35902af..afbbed9a3d3 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.4.0 + 25.0.0 pom import From 843aefd001486e669f169e786b265fb433c1f68c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Mar 2022 01:39:30 +0200 Subject: [PATCH 298/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.116.0 (#841) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:google-cloud-pubsub to v1.116.0 * 🦉 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 --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index bc2393de7c2..2e64cccdf7c 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.115.5 + 1.116.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 909c8208e04..919e24916ae 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.115.5 + 1.116.0 junit From 14daf22e507b2ef8d8e070ea9358212bb56e7914 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Mar 2022 01:40:00 +0200 Subject: [PATCH 299/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.4 (#840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.1.4 * 🦉 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 --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 2e64cccdf7c..a74585197bc 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.1.3 + 3.1.4 From 4e96696df2b0040220e147465e51d69bb96c55a2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 23:48:12 +0000 Subject: [PATCH 300/406] chore(main): release 3.2.0 (#850) :robot: I have created a release *beep* *boop* --- ## [3.2.0](https://github.com/googleapis/java-dlp/compare/v3.1.4...v3.2.0) (2022-03-29) ### Features * new Bytes and File types: POWERPOINT and EXCEL ([#848](https://github.com/googleapis/java-dlp/issues/848)) ([ffb764d](https://github.com/googleapis/java-dlp/commit/ffb764ddd766987f92805cfadb1a7c7bacdef9ae)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.116.0 ([#841](https://github.com/googleapis/java-dlp/issues/841)) ([e12a43f](https://github.com/googleapis/java-dlp/commit/e12a43f967cd8428ee5e724d84448c8254b43aac)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#849](https://github.com/googleapis/java-dlp/issues/849)) ([7106010](https://github.com/googleapis/java-dlp/commit/7106010c7e9ce6523ee62f06fd31c98a6e75dd5a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 919e24916ae..2720ba7f715 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.1.5-SNAPSHOT + 3.2.0 From 363462235f543f951816c2aca8de6445db48d60b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 23:56:11 +0000 Subject: [PATCH 301/406] chore(main): release 3.2.1-SNAPSHOT (#852) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2720ba7f715..e10dce64cdb 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.2.0 + 3.2.1-SNAPSHOT From 5acfab2f9a082eb5666632d046fa3ef3a7dc1702 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 31 Mar 2022 19:16:31 +0200 Subject: [PATCH 302/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.2.0 (#853) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.2.0 * 🦉 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 --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a74585197bc..9143e2ccac2 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.1.4 + 3.2.0 From 48e5912f09e7e5b9c3438f4ed816161f01f742d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Apr 2022 18:40:11 +0200 Subject: [PATCH 303/406] chore(deps): update dependency com.google.cloud:libraries-bom to v25.1.0 (#854) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.0.0` -> `25.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/compatibility-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/confidence-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index afbbed9a3d3..3e63c0cd4c8 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.0.0 + 25.1.0 pom import From 0deb2bdd9b92d8424cafb73e5213544e2a9af565 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Apr 2022 19:54:21 +0200 Subject: [PATCH 304/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.116.3 (#851) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.116.0` -> `1.116.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.3/compatibility-slim/1.116.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.3/confidence-slim/1.116.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.116.3`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11163-httpsgithubcomgoogleapisjava-pubsubcomparev11162v11163-2022-03-29) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.116.2...v1.116.3) ### [`v1.116.2`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11162-httpsgithubcomgoogleapisjava-pubsubcomparev11161v11162-2022-03-24) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.116.1...v1.116.2) ### [`v1.116.1`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11161-httpsgithubcomgoogleapisjava-pubsubcomparev11160v11161-2022-03-22) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.116.0...v1.116.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9143e2ccac2..967be17a7f0 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.116.0 + 1.116.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e10dce64cdb..d2d27044e7b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.116.0 + 1.116.3 junit From 7c7af7e37dd98ecf8479754a07741ab50ffeffb4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 18:06:12 +0000 Subject: [PATCH 305/406] chore(main): release 3.2.1 (#856) :robot: I have created a release *beep* *boop* --- ### [3.2.1](https://github.com/googleapis/java-dlp/compare/v3.2.0...v3.2.1) (2022-04-01) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.116.3 ([#851](https://github.com/googleapis/java-dlp/issues/851)) ([3a53167](https://github.com/googleapis/java-dlp/commit/3a531677fea78bcf9a14d764debf03870ddfcae0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d2d27044e7b..160be4f7e6a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.2.1-SNAPSHOT + 3.2.1 From 7fd474b002514bcb70e118b41077f999cd06cb1f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 18:12:22 +0000 Subject: [PATCH 306/406] chore(main): release 3.2.2-SNAPSHOT (#857) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 160be4f7e6a..088c853c444 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.2.1 + 3.2.2-SNAPSHOT From b84cc8141bd2af78a47b08840bfb8e900d56554d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 4 Apr 2022 20:34:10 +0200 Subject: [PATCH 307/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.2.1 (#859) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.2.0` -> `3.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.2.1/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.2.1/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.2.1`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​321-httpsgithubcomgoogleapisjava-dlpcomparev320v321-2022-04-01) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.2.0...v3.2.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 967be17a7f0..e2dfc1e294b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.2.0 + 3.2.1 From 4a2e889f56d0fba60d9523aaa81ad35bf961897e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 18:12:16 +0000 Subject: [PATCH 308/406] chore(main): release 3.3.0 (#862) :robot: I have created a release *beep* *boop* --- ## [3.3.0](https://github.com/googleapis/java-dlp/compare/v3.2.1...v3.3.0) (2022-04-15) ### Features * add DataProfilePubSubMessage supporting pub/sub integration ([#855](https://github.com/googleapis/java-dlp/issues/855)) ([86eeaaa](https://github.com/googleapis/java-dlp/commit/86eeaaae7bbe809d1d4651b3417e6899a6792e6c)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#863](https://github.com/googleapis/java-dlp/issues/863)) ([a0a3164](https://github.com/googleapis/java-dlp/commit/a0a316479108eda8903f423fe2bacf72be57e8dd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 088c853c444..ac9d9f7a3d7 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.2.2-SNAPSHOT + 3.3.0 From a6c706849960be65314c0525c9fb4610cddc97b3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Apr 2022 18:18:20 +0000 Subject: [PATCH 309/406] chore(main): release 3.3.1-SNAPSHOT (#865) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ac9d9f7a3d7..a0aaff2a626 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.0 + 3.3.1-SNAPSHOT From 94ada843851c24056ca5cc90d58cae12ae2d24f9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 19:38:35 +0200 Subject: [PATCH 310/406] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.13 (#869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.11` -> `1.6.13` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/compatibility-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/confidence-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.13`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) ### [`v1.6.12`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 3d01cdf50be..b490e9de32d 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.13 true From 0daaa8544ba443332125b41a37d9948782152eb6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 19:50:20 +0200 Subject: [PATCH 311/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.3.0 (#866) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.2.1` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.0/compatibility-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.0/confidence-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.3.0`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​330-httpsgithubcomgoogleapisjava-dlpcomparev321v330-2022-04-15) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.2.1...v3.3.0) ##### Features - add DataProfilePubSubMessage supporting pub/sub integration ([#​855](https://togithub.com/googleapis/java-dlp/issues/855)) ([86eeaaa](https://togithub.com/googleapis/java-dlp/commit/86eeaaae7bbe809d1d4651b3417e6899a6792e6c)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#​863](https://togithub.com/googleapis/java-dlp/issues/863)) ([a0a3164](https://togithub.com/googleapis/java-dlp/commit/a0a316479108eda8903f423fe2bacf72be57e8dd)) ##### [3.2.1](https://togithub.com/googleapis/java-dlp/compare/v3.2.0...v3.2.1) (2022-04-01) ##### Dependencies - update dependency com.google.cloud:google-cloud-pubsub to v1.116.3 ([#​851](https://togithub.com/googleapis/java-dlp/issues/851)) ([3a53167](https://togithub.com/googleapis/java-dlp/commit/3a531677fea78bcf9a14d764debf03870ddfcae0))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index e2dfc1e294b..3ae7236ff79 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.2.1 + 3.3.0 From 287f9eecd7b8d64e46cbe7f0d94d69a2aaa77daf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 21:38:12 +0200 Subject: [PATCH 312/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.116.4 (#864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.116.3` -> `1.116.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.4/compatibility-slim/1.116.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.116.4/confidence-slim/1.116.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.116.4`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11164-httpsgithubcomgoogleapisjava-pubsubcomparev11163v11164-2022-04-19) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.116.3...v1.116.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3ae7236ff79..ede68fa85cc 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.116.3 + 1.116.4 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index a0aaff2a626..672d6519b9e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.116.3 + 1.116.4 junit From 7ec4ed63995168da50e22fb658d9884d93fbc9ca Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:44:11 +0000 Subject: [PATCH 313/406] chore(main): release 3.3.1 (#870) :robot: I have created a release *beep* *boop* --- ### [3.3.1](https://github.com/googleapis/java-dlp/compare/v3.3.0...v3.3.1) (2022-04-21) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.116.4 ([#864](https://github.com/googleapis/java-dlp/issues/864)) ([cd2f2c3](https://github.com/googleapis/java-dlp/commit/cd2f2c37e3fedd5cf2ae428783b3b6993576c884)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 672d6519b9e..cc4807236e1 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.1-SNAPSHOT + 3.3.1 From 7b81ffdcba17115ff41c253bd9d26d6fcf2db2ce Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:54:15 +0000 Subject: [PATCH 314/406] chore(main): release 3.3.2-SNAPSHOT (#871) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index cc4807236e1..70b4259d3d3 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.1 + 3.3.2-SNAPSHOT From 6c457e6a272c897e678d1ac6665782721a4c0054 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 22 Apr 2022 01:04:11 +0200 Subject: [PATCH 315/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.3.1 (#872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.3.0` -> `3.3.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.1/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.1/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.3.1`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​331-httpsgithubcomgoogleapisjava-dlpcomparev330v331-2022-04-21) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.3.0...v3.3.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index ede68fa85cc..407d253a5e2 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.3.0 + 3.3.1 From e4705bf8303facda6156079f191de70b0f910c6c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Apr 2022 17:34:28 +0200 Subject: [PATCH 316/406] chore(deps): update dependency com.google.cloud:libraries-bom to v25.2.0 (#874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.1.0` -> `25.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/compatibility-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/confidence-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 3e63c0cd4c8..be18fc5b598 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.1.0 + 25.2.0 pom import From c263eaf46b065568bbe6d680c29e634aaa79b90d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 12 May 2022 22:41:38 +0200 Subject: [PATCH 317/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.117.0 (#878) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 407d253a5e2..d49a85171b1 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.116.4 + 1.117.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 70b4259d3d3..c8c3d2308d3 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.116.4 + 1.117.0 junit From 55fdc7984ff75fd27ade06e524d7ef1eb49a4e69 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 20:48:34 +0000 Subject: [PATCH 318/406] chore(main): release 3.3.2 (#879) :robot: I have created a release *beep* *boop* --- ### [3.3.2](https://github.com/googleapis/java-dlp/compare/v3.3.1...v3.3.2) (2022-05-12) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.117.0 ([#878](https://github.com/googleapis/java-dlp/issues/878)) ([de209cb](https://github.com/googleapis/java-dlp/commit/de209cb025765f945175d5ec8576a5aa4ad20cc0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c8c3d2308d3..7416b2fb3a9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.2-SNAPSHOT + 3.3.2 From f46e5f5964f518d9dbdf579eae94a5c8188335e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 21:00:16 +0000 Subject: [PATCH 319/406] chore(main): release 3.3.3-SNAPSHOT (#880) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7416b2fb3a9..138253ef3c9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.2 + 3.3.3-SNAPSHOT From 5d634c699cd47c472d77f69e272a899269e52b2e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:48:18 +0200 Subject: [PATCH 320/406] chore(deps): update dependency com.google.cloud:libraries-bom to v25.3.0 (#882) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.2.0` -> `25.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/compatibility-slim/25.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.3.0/confidence-slim/25.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index be18fc5b598..9572a2eec7c 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.2.0 + 25.3.0 pom import From cfd39ce571eed0897bc9bcb45fa36a77d8581f6a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:54:17 +0200 Subject: [PATCH 321/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.3.2 (#881) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.3.1` -> `3.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.2/compatibility-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.3.2/confidence-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d49a85171b1..d88e7bdcf54 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.3.1 + 3.3.2 From 021810bddcff1c9cc3703e9f6486deed047a9a3f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 20 May 2022 01:46:16 +0200 Subject: [PATCH 322/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.118.0 (#884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.117.0` -> `1.118.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.118.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.118.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.118.0/compatibility-slim/1.117.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.118.0/confidence-slim/1.117.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.118.0`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11180-httpsgithubcomgoogleapisjava-pubsubcomparev11170v11180-2022-05-18) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.117.0...v1.118.0) ##### Features - creating java backport ([#​1120](https://togithub.com/googleapis/java-pubsub/issues/1120)) ([d88f417](https://togithub.com/googleapis/java-pubsub/commit/d88f4175356b0fdeb0697cfb1a7e6cd83ac0b7a5)) - next release from main branch is 1.118.0 ([#​1127](https://togithub.com/googleapis/java-pubsub/issues/1127)) ([67605a7](https://togithub.com/googleapis/java-pubsub/commit/67605a7efb36da5b9e123efb8fe69c58d4cfcbfd)) ##### Bug Fixes - Too many leases ([#​1135](https://togithub.com/googleapis/java-pubsub/issues/1135)) ([c9bcec5](https://togithub.com/googleapis/java-pubsub/commit/c9bcec531bf175684306e50eaf7ef96ee60cba78))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d88e7bdcf54..0d28e00a9e1 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.117.0 + 1.118.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 138253ef3c9..fad04e99651 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.117.0 + 1.118.0 junit From 8212a40ed4d6cecf14211b73d651f9aad95c0ab4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 03:50:11 +0000 Subject: [PATCH 323/406] chore(main): release 3.4.0 (#886) :robot: I have created a release *beep* *boop* --- ## [3.4.0](https://github.com/googleapis/java-dlp/compare/v3.3.2...v3.4.0) (2022-05-19) ### Features * add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/java-dlp/issues/1440)) ([#885](https://github.com/googleapis/java-dlp/issues/885)) ([fc0fd35](https://github.com/googleapis/java-dlp/commit/fc0fd351e85c8e54099f576a77204c3144fa36e9)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.118.0 ([#884](https://github.com/googleapis/java-dlp/issues/884)) ([e5ac330](https://github.com/googleapis/java-dlp/commit/e5ac33020d7775d95743f3ad0f64f2de51455816)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#883](https://github.com/googleapis/java-dlp/issues/883)) ([ef507e8](https://github.com/googleapis/java-dlp/commit/ef507e8efa46d5ca3d0285a51bae350c77b689db)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index fad04e99651..6937d51a7a6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.3.3-SNAPSHOT + 3.4.0 From 34b459d7240bfcf3a96499d9c3449d9ffffc374a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:14:10 +0200 Subject: [PATCH 324/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.119.0 (#892) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.118.0` -> `1.119.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.0/compatibility-slim/1.118.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.0/confidence-slim/1.118.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0d28e00a9e1..e213cd71310 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.118.0 + 1.119.0 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6937d51a7a6..28f5d3dce14 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.118.0 + 1.119.0 junit From 02dc49eff70625ce3fbe03d1e4df2e335ea3000f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:16:12 +0200 Subject: [PATCH 325/406] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#893) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 9572a2eec7c..4fbda376557 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From bd31f921dffb1153d8af8bd3b54e215fc955582e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 21 Jun 2022 18:24:15 +0200 Subject: [PATCH 326/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.119.1 (#894) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.119.0` -> `1.119.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/compatibility-slim/1.119.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/confidence-slim/1.119.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.119.1`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11191-httpsgithubcomgoogleapisjava-pubsubcomparev11190v11191-2022-06-06) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.119.0...v1.119.1) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.0 ([#​1152](https://togithub.com/googleapis/java-pubsub/issues/1152)) ([d015371](https://togithub.com/googleapis/java-pubsub/commit/d015371c91e22a1c03494da37a2523110c3437e0)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.1 ([#​1154](https://togithub.com/googleapis/java-pubsub/issues/1154)) ([61aeecf](https://togithub.com/googleapis/java-pubsub/commit/61aeecf6c40ad0b9aa93ea48acc8cca0fe4e3764))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index e213cd71310..45857835114 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.119.0 + 1.119.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 28f5d3dce14..b4d7ac04ee9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.119.0 + 1.119.1 junit From 82635dc92276daf5003f418945624289ae421b3c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 03:48:14 +0000 Subject: [PATCH 327/406] chore(main): release 3.4.1-SNAPSHOT (#888) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index b4d7ac04ee9..700f27f03e3 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.4.0 + 3.4.1-SNAPSHOT From 198ff2df48779118a9b3e348f92d1eb1ad2d1f07 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:28:31 +0000 Subject: [PATCH 328/406] chore(main): release 3.5.0 (#914) :robot: I have created a release *beep* *boop* --- ## [3.5.0](https://github.com/googleapis/java-dlp/compare/v3.4.0...v3.5.0) (2022-07-01) ### Features * Enable REST transport for most of Java and Go clients ([#899](https://github.com/googleapis/java-dlp/issues/899)) ([a9d2cd5](https://github.com/googleapis/java-dlp/commit/a9d2cd55432c73055b1233c5d1e7478eb5b40bb0)) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.119.0 ([#892](https://github.com/googleapis/java-dlp/issues/892)) ([ccd229f](https://github.com/googleapis/java-dlp/commit/ccd229f80adfb00d303f47ee9ebdc3de7f856e0d)) * update dependency com.google.cloud:google-cloud-pubsub to v1.119.1 ([#894](https://github.com/googleapis/java-dlp/issues/894)) ([70ad786](https://github.com/googleapis/java-dlp/commit/70ad78640484d28e3811f1941a5373e233f821e0)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#898](https://github.com/googleapis/java-dlp/issues/898)) ([ff761b3](https://github.com/googleapis/java-dlp/commit/ff761b3373d67e1dc8e66d9fdc1e59cdb73aacad)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 700f27f03e3..768885e9964 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.4.1-SNAPSHOT + 3.5.0 From 9542a8fdf4e046565dde27558a35163b3d62ba7e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:34:11 +0000 Subject: [PATCH 329/406] chore(main): release 3.5.1-SNAPSHOT (#915) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 768885e9964..cdfadb17bc8 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.5.0 + 3.5.1-SNAPSHOT From ad19d85be879c3f231d558ae837343e868781936 Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:46:40 -0400 Subject: [PATCH 330/406] fix: suppress checkstyle for certain methods (#921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: suppress checkstyle for certain methods * add new line * 🦉 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 --- .../main/java/dlp/snippets/RiskAnalysisCategoricalStats.java | 1 + .../src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java | 1 + .../snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java | 2 ++ .../src/main/java/dlp/snippets/RiskAnalysisLDiversity.java | 1 + .../snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java | 1 + 5 files changed, 6 insertions(+) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index 2383d777adc..3a80fb2e5f1 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -15,6 +15,7 @@ */ package dlp.snippets; + // [START dlp_categorical_stats] import com.google.api.core.SettableApiFuture; diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index 252c87c2ad4..d0ac6b75e62 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -49,6 +49,7 @@ import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; +@SuppressWarnings("checkstyle:AbbreviationAsWordInName") class RiskAnalysisKAnonymity { public static void main(String[] args) throws Exception { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index a698b0be5e3..5bafb93b26e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -15,6 +15,7 @@ */ package dlp.snippets; + // [START dlp_k_map] import com.google.api.core.SettableApiFuture; @@ -50,6 +51,7 @@ import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; +@SuppressWarnings("checkstyle:AbbreviationAsWordInName") class RiskAnalysisKMap { public static void main(String[] args) throws Exception { diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 601db01e537..48fdbf70ea8 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -52,6 +52,7 @@ import java.util.stream.Collectors; import org.threeten.bp.Duration; +@SuppressWarnings("checkstyle:AbbreviationAsWordInName") class RiskAnalysisLDiversity { public static void main(String[] args) throws Exception { diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index 971955711bd..548f2bfe068 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -32,6 +32,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +@SuppressWarnings("checkstyle:AbbreviationAsWordInName") @RunWith(JUnit4.class) public class RiskAnalysisTests extends TestBase { From 358035ecdd17ec9e8646ae169a441f9109fa649b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 16:59:50 +0200 Subject: [PATCH 331/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.5.0 (#891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.5.0 * 🦉 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 --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 45857835114..a9690c1dbb9 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.3.2 + 3.5.0 From dc0906f840d82c3621a249618d3fb8d8ccf94d01 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 17:53:03 +0200 Subject: [PATCH 332/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.1 (#917) --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a9690c1dbb9..3edf31a027f 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.119.1 + 1.120.1 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index cdfadb17bc8..6ee1daeceb9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.119.1 + 1.120.1 junit From e39d521f820192313c49bd41683e05034ba95665 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 17:53:12 +0200 Subject: [PATCH 333/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#919) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 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 --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 4fbda376557..3563556e650 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.0.0 pom import From 151bead1ac3d51bcbd7b7e92fdb6d0ba9741c8ce Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 16:48:47 -0400 Subject: [PATCH 334/406] chore(main): release 3.6.0 (#923) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 6ee1daeceb9..ddc002fd0c0 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.5.1-SNAPSHOT + 3.6.0 From ad4f3d1e9a6ab66ab9511a828bfad913aab8f99b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 20:56:16 +0000 Subject: [PATCH 335/406] chore(main): release 3.6.1-SNAPSHOT (#925) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ddc002fd0c0..ebd79282da1 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.0 + 3.6.1-SNAPSHOT From 34763f1c30ef5ef4c33d23e1fb33f42a759677d3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 19:26:11 +0200 Subject: [PATCH 336/406] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#928) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index b490e9de32d..8f707e2876f 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true From 16a5b07bfc3cbb7beb1b0411a39a8fe15ab3222d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Jul 2022 21:22:25 +0200 Subject: [PATCH 337/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.2 (#930) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.1` -> `1.120.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.2/compatibility-slim/1.120.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.2/confidence-slim/1.120.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.2`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11202-httpsgithubcomgoogleapisjava-pubsubcomparev11201v11202-2022-07-25) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.1...v1.120.2) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-pubsub/issues/1485)) ([#​1191](https://togithub.com/googleapis/java-pubsub/issues/1191)) ([c4b8d90](https://togithub.com/googleapis/java-pubsub/commit/c4b8d90a158a3360d626df8ca6378212e09f5a47)) - PubSubMessage leak on MessageDispatcher ([#​1197](https://togithub.com/googleapis/java-pubsub/issues/1197)) ([1b8c440](https://togithub.com/googleapis/java-pubsub/commit/1b8c440fccc51dc2291c43b2972b1f5c08dfd65a)) ##### Dependencies - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#​1189](https://togithub.com/googleapis/java-pubsub/issues/1189)) ([0d96f8e](https://togithub.com/googleapis/java-pubsub/commit/0d96f8e2006c145de039d2f00c5eb1d8830eae3d)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#​1190](https://togithub.com/googleapis/java-pubsub/issues/1190)) ([c604080](https://togithub.com/googleapis/java-pubsub/commit/c6040802bcf97d063e2b91cdb5fa7fe3c3e3b807))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 3edf31a027f..8186e7950b5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.1 + 1.120.2 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ebd79282da1..7bd840b50b6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.1 + 1.120.2 junit From ffc78edd26c4ed7e92b60a664bec00336f182388 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:30:21 +0000 Subject: [PATCH 338/406] chore(main): release 3.6.1 (#933) :robot: I have created a release *beep* *boop* --- ## [3.6.1](https://github.com/googleapis/java-dlp/compare/v3.6.0...v3.6.1) (2022-07-26) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.120.2 ([#930](https://github.com/googleapis/java-dlp/issues/930)) ([2ba1675](https://github.com/googleapis/java-dlp/commit/2ba1675a65319d61be8536727be94b6ead8c5d52)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7bd840b50b6..8de3efd84d6 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.1-SNAPSHOT + 3.6.1 From 3aba402c497ec1bae6c659fd30b47efe9362ee74 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:36:17 +0000 Subject: [PATCH 339/406] chore(main): release 3.6.2-SNAPSHOT (#934) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 8de3efd84d6..760d6ef2d20 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.1 + 3.6.2-SNAPSHOT From ad98f48a5f3dec1a50099c49ebd2ce851a8310c9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 Jul 2022 23:52:20 +0200 Subject: [PATCH 340/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.3 (#936) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.2` -> `1.120.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.3/compatibility-slim/1.120.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.3/confidence-slim/1.120.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 8186e7950b5..c9ceee41afd 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.2 + 1.120.3 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 760d6ef2d20..920c3c95555 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.2 + 1.120.3 junit From 1c06f72e1ff910da87417536a2b51fa598ad8571 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:00:22 +0000 Subject: [PATCH 341/406] chore(main): release 3.6.2 (#938) :robot: I have created a release *beep* *boop* --- ## [3.6.2](https://github.com/googleapis/java-dlp/compare/v3.6.1...v3.6.2) (2022-07-29) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.120.3 ([#936](https://github.com/googleapis/java-dlp/issues/936)) ([f6156cd](https://github.com/googleapis/java-dlp/commit/f6156cd65be12caf2fecaafa6ca6125dc16ca892)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 920c3c95555..4f7e1ae447d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.2-SNAPSHOT + 3.6.2 From 7b818b18579f7e98dcb204f0fa21f0c815022832 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:06:15 +0000 Subject: [PATCH 342/406] chore(main): release 3.6.3-SNAPSHOT (#939) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 4f7e1ae447d..eedcf00d5af 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.2 + 3.6.3-SNAPSHOT From c4bd1c7551cb88b18190f548a33068dff372e990 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 00:38:21 +0000 Subject: [PATCH 343/406] chore(main): release 3.6.3 (#941) :robot: I have created a release *beep* *boop* --- ## [3.6.3](https://github.com/googleapis/java-dlp/compare/v3.6.2...v3.6.3) (2022-07-30) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#940](https://github.com/googleapis/java-dlp/issues/940)) ([1afea23](https://github.com/googleapis/java-dlp/commit/1afea2346990c2c2a72ff051822ba725f464d8a0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index eedcf00d5af..c96eeb8dbab 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.3-SNAPSHOT + 3.6.3 From 02665809e45552009fe101e5fc39d6f784d4506d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 01:04:14 +0000 Subject: [PATCH 344/406] chore(main): release 3.6.4-SNAPSHOT (#942) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c96eeb8dbab..f6d7fbd712f 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.3 + 3.6.4-SNAPSHOT From 63b6a3857d2ebe6a23a41353d613de3d26d41081 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 21:00:17 +0200 Subject: [PATCH 345/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.6.3 (#944) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.5.0` -> `3.6.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.3/compatibility-slim/3.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.3/confidence-slim/3.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index c9ceee41afd..af5e5f0ce8b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.5.0 + 3.6.3 From 9a683aafa501386bd21aad0bc68a57a6486bea01 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 21:10:13 +0200 Subject: [PATCH 346/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.5 (#943) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.3` -> `1.120.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/compatibility-slim/1.120.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/confidence-slim/1.120.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index af5e5f0ce8b..4d5197431b5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.3 + 1.120.5 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f6d7fbd712f..e68cbbe7bc4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.3 + 1.120.5 junit From 0f30a61e22bb573cfa0e66a8ab1f998d91ea988b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Aug 2022 00:20:19 +0200 Subject: [PATCH 347/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.8 (#947) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.5` -> `1.120.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/compatibility-slim/1.120.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/confidence-slim/1.120.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.8`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11208-httpsgithubcomgoogleapisjava-pubsubcomparev11207v11208-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.7...v1.120.8) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v2.8.6 ([#​1222](https://togithub.com/googleapis/java-pubsub/issues/1222)) ([55eebf5](https://togithub.com/googleapis/java-pubsub/commit/55eebf55785a700a67dc3a97b21837acf14d9a64)) ### [`v1.120.7`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11207-httpsgithubcomgoogleapisjava-pubsubcomparev11206v11207-2022-08-01) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.6...v1.120.7) ##### Bug Fixes - Updated log level from WARNING -> INFO for EOD failures ([#​1218](https://togithub.com/googleapis/java-pubsub/issues/1218)) ([8782533](https://togithub.com/googleapis/java-pubsub/commit/8782533204fcc312c1063763f5073db83c72382f)) ### [`v1.120.6`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11206-httpsgithubcomgoogleapisjava-pubsubcomparev11205v11206-2022-08-01) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.5...v1.120.6) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#​1215](https://togithub.com/googleapis/java-pubsub/issues/1215)) ([5667492](https://togithub.com/googleapis/java-pubsub/commit/56674928f2e671487c8d4c0dad4e45368da47e0e)) - update dependency com.google.cloud:google-cloud-core to v2.8.5 ([#​1213](https://togithub.com/googleapis/java-pubsub/issues/1213)) ([5db0c2c](https://togithub.com/googleapis/java-pubsub/commit/5db0c2cafcf27a80ac4e18c623fc22c2af252774)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.4 ([#​1214](https://togithub.com/googleapis/java-pubsub/issues/1214)) ([bfc53d9](https://togithub.com/googleapis/java-pubsub/commit/bfc53d9fb616b4ee22e2c39dbaf1eed7354142a7)) - update dependency org.apache.avro:avro to v1.11.1 ([#​1210](https://togithub.com/googleapis/java-pubsub/issues/1210)) ([fafcded](https://togithub.com/googleapis/java-pubsub/commit/fafcdede6b4e5ef5098b8b04a53d9e42b59cda3d))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 4d5197431b5..89f642fa880 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.5 + 1.120.8 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e68cbbe7bc4..779543c64a3 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.5 + 1.120.8 junit From 41034a7ee98628da9cc94ca2e554ec9ba1dba205 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 22:28:17 +0000 Subject: [PATCH 348/406] chore(main): release 3.6.4 (#948) :robot: I have created a release *beep* *boop* --- ## [3.6.4](https://github.com/googleapis/java-dlp/compare/v3.6.3...v3.6.4) (2022-08-02) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.120.5 ([#943](https://github.com/googleapis/java-dlp/issues/943)) ([ddcc6dd](https://github.com/googleapis/java-dlp/commit/ddcc6dd1a49dfe4f87e8a47730d52183a9bcb0e3)) * update dependency com.google.cloud:google-cloud-pubsub to v1.120.8 ([#947](https://github.com/googleapis/java-dlp/issues/947)) ([41ba0fc](https://github.com/googleapis/java-dlp/commit/41ba0fc1abc08201bb9d64015d752ade9669460e)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#946](https://github.com/googleapis/java-dlp/issues/946)) ([15e9725](https://github.com/googleapis/java-dlp/commit/15e97256a669d5076a0cf6238b0d5bc4fbf211fc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 779543c64a3..aa9d2faa750 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.4-SNAPSHOT + 3.6.4 From 37b1c959b59ded8f820babb17b40d9fc7615cf82 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 22:38:25 +0000 Subject: [PATCH 349/406] chore(main): release 3.6.5-SNAPSHOT (#949) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index aa9d2faa750..e40d7c0a609 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.4 + 3.6.5-SNAPSHOT From 57cac2aa669567579b8262ce985c77a508d1764a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Aug 2022 16:58:13 +0200 Subject: [PATCH 350/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.6.4 (#950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.6.3` -> `3.6.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.4/compatibility-slim/3.6.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.4/confidence-slim/3.6.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 89f642fa880..1374ecf0177 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.6.3 + 3.6.4 From 610d0daeee56c1d9831bab053128797739738cf3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Aug 2022 07:06:41 +0200 Subject: [PATCH 351/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.9 (#951) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.8` -> `1.120.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.9/compatibility-slim/1.120.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.9/confidence-slim/1.120.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.9`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11209-httpsgithubcomgoogleapisjava-pubsubcomparev11208v11209-2022-08-03) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.8...v1.120.9) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#​1227](https://togithub.com/googleapis/java-pubsub/issues/1227)) ([e967b2c](https://togithub.com/googleapis/java-pubsub/commit/e967b2c393a601c7e9dfba33ec2f19ef6e9757c1)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#​1226](https://togithub.com/googleapis/java-pubsub/issues/1226)) ([8fab566](https://togithub.com/googleapis/java-pubsub/commit/8fab566e2b0ff726bd9a1dff842b11f5c6c9b00b))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 1374ecf0177..81fb081487f 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.8 + 1.120.9 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index e40d7c0a609..12afb06c06e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.8 + 1.120.9 junit From 25b866aa497a6d3f8b66f355b501c8ae92091fae Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 05:14:13 +0000 Subject: [PATCH 352/406] chore(main): release 3.6.5 (#952) :robot: I have created a release *beep* *boop* --- ## [3.6.5](https://github.com/googleapis/java-dlp/compare/v3.6.4...v3.6.5) (2022-08-04) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.120.9 ([#951](https://github.com/googleapis/java-dlp/issues/951)) ([bca61fa](https://github.com/googleapis/java-dlp/commit/bca61fa43a1e1a8ea8bebbd3ff3c39146a0bb308)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 12afb06c06e..27688830e98 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.5-SNAPSHOT + 3.6.5 From 249ff6a2b897becb1824711ff964923693cb0128 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 05:22:14 +0000 Subject: [PATCH 353/406] chore(main): release 3.6.6-SNAPSHOT (#953) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 27688830e98..536de4a30bc 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.5 + 3.6.6-SNAPSHOT From c01ed2539f5563ece7e3a2ac12d9a9e4d2561140 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Aug 2022 19:10:12 +0200 Subject: [PATCH 354/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.6.5 (#954) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.6.4` -> `3.6.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.5/compatibility-slim/3.6.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.5/confidence-slim/3.6.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 81fb081487f..0d1efd1d403 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.6.4 + 3.6.5 From 38a0bbe24903126c68b6a7f10a056276c3bb1e3e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Aug 2022 00:44:14 +0200 Subject: [PATCH 355/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.10 (#955) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.9` -> `1.120.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.10/compatibility-slim/1.120.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.10/confidence-slim/1.120.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.10`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112010-httpsgithubcomgoogleapisjava-pubsubcomparev11209v112010-2022-08-04) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.9...v1.120.10) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v2.8.8 ([#​1231](https://togithub.com/googleapis/java-pubsub/issues/1231)) ([9d13dd8](https://togithub.com/googleapis/java-pubsub/commit/9d13dd8bc43e24815884dde421409136958d4b0f))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0d1efd1d403..d31e0e98874 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.9 + 1.120.10 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 536de4a30bc..30c4052c53c 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.9 + 1.120.10 junit From 9d8f3914d2b035e3d133cef824d21627d845b6a8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 22:52:12 +0000 Subject: [PATCH 356/406] chore(main): release 3.6.6 (#956) :robot: I have created a release *beep* *boop* --- ## [3.6.6](https://github.com/googleapis/java-dlp/compare/v3.6.5...v3.6.6) (2022-08-04) ### Dependencies * update dependency com.google.cloud:google-cloud-pubsub to v1.120.10 ([#955](https://github.com/googleapis/java-dlp/issues/955)) ([5e28ddc](https://github.com/googleapis/java-dlp/commit/5e28ddca45fbe08fe3612a61056ad77b55225c92)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 30c4052c53c..ef44d21942a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.6-SNAPSHOT + 3.6.6 From 226d9d7b9ea6b2d117bf24d5a36f64b5b59ad661 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 4 Aug 2022 23:00:22 +0000 Subject: [PATCH 357/406] chore(main): release 3.6.7-SNAPSHOT (#957) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ef44d21942a..f24cc44bc28 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.6 + 3.6.7-SNAPSHOT From 237275e5838a053a4ee11f38cb17a33daf142202 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Aug 2022 17:54:15 +0200 Subject: [PATCH 358/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.6.6 (#958) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.6.5` -> `3.6.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.6/compatibility-slim/3.6.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.6/confidence-slim/3.6.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d31e0e98874..75b60722642 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.6.5 + 3.6.6 From a88cbcc6117ad35785e9f67425d747789237dcd5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:34:30 +0000 Subject: [PATCH 359/406] chore(main): release 3.6.7 (#959) :robot: I have created a release *beep* *boop* --- ## [3.6.7](https://github.com/googleapis/java-dlp/compare/v3.6.6...v3.6.7) (2022-08-05) ### Documentation * **owlbot-java:** explaining why not using formatter in pom.xml ([#1511](https://github.com/googleapis/java-dlp/issues/1511)) ([#945](https://github.com/googleapis/java-dlp/issues/945)) ([ab8d91f](https://github.com/googleapis/java-dlp/commit/ab8d91ffd0eb4a7cf396e305673bcbee1fcd7d52)), closes [#1502](https://github.com/googleapis/java-dlp/issues/1502) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f24cc44bc28..d4f754d22f9 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.7-SNAPSHOT + 3.6.7 From db80c55eb219836372f96dc7e924f408f4b77732 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 18:48:13 +0200 Subject: [PATCH 360/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.6.7 (#964) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.6.6` -> `3.6.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.7/compatibility-slim/3.6.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.6.7/confidence-slim/3.6.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 75b60722642..afc6e6ca08a 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.6.6 + 3.6.7 From 7ab911ab40c27d735a9a407d149501aa59d99941 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 18:48:21 +0200 Subject: [PATCH 361/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 3563556e650..05e99c87d11 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import From f1236d68e42a9f61343c9eb1b19f2993fdcb302c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 18 Aug 2022 15:44:33 +0200 Subject: [PATCH 362/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.11 (#960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.10` -> `1.120.11` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.11/compatibility-slim/1.120.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.11/confidence-slim/1.120.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.11`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112011-httpsgithubcomgoogleapisjava-pubsubcomparev112010v112011-2022-08-06) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.10...v1.120.11) ##### Bug Fixes - fix dependency declaration to properly include runtime scope ([#​1238](https://togithub.com/googleapis/java-pubsub/issues/1238)) ([e9a4ce5](https://togithub.com/googleapis/java-pubsub/commit/e9a4ce59fdf3773fa41698579984af525a277f38)) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.2 ([#​1235](https://togithub.com/googleapis/java-pubsub/issues/1235)) ([e2af6c3](https://togithub.com/googleapis/java-pubsub/commit/e2af6c358ef9e7a0d35179bc4a7c793bbc6a0960)) - update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#​1236](https://togithub.com/googleapis/java-pubsub/issues/1236)) ([399e8d7](https://togithub.com/googleapis/java-pubsub/commit/399e8d71d5b4aed2fa48e8cba2dce963d25693e3))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index afc6e6ca08a..483bbbda32c 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.10 + 1.120.11 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index d4f754d22f9..c9cbfb48515 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.10 + 1.120.11 junit From 2075ddc01505eeab8b1157473566a2702173fb63 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Aug 2022 15:26:47 +0200 Subject: [PATCH 363/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.12 (#969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.11` -> `1.120.12` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/compatibility-slim/1.120.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/confidence-slim/1.120.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.12`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112012-httpsgithubcomgoogleapisjava-pubsubcomparev112011v112012-2022-08-18) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.11...v1.120.12) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.4 ([#​1242](https://togithub.com/googleapis/java-pubsub/issues/1242)) ([08cfe80](https://togithub.com/googleapis/java-pubsub/commit/08cfe805e71831e040f63755acde17ec45c21418)) - update dependency com.google.cloud:google-cloud-bigquery to v2.14.6 ([#​1245](https://togithub.com/googleapis/java-pubsub/issues/1245)) ([7f933ee](https://togithub.com/googleapis/java-pubsub/commit/7f933ee35055c608e9f5b72251583060943a79ea)) - update dependency com.google.cloud:google-cloud-core to v2.8.9 ([#​1250](https://togithub.com/googleapis/java-pubsub/issues/1250)) ([7c8fd41](https://togithub.com/googleapis/java-pubsub/commit/7c8fd4183523b876983c89d4b7994746b11964c3)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​1243](https://togithub.com/googleapis/java-pubsub/issues/1243)) ([37eaff8](https://togithub.com/googleapis/java-pubsub/commit/37eaff859422bb215ace202ffd0adf8a651dadb5))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 483bbbda32c..de37f08b09b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index c9cbfb48515..51368b11dfc 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 junit From f553eae80e8efba54ff4bd8783007ec249145e38 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Aug 2022 23:46:25 +0200 Subject: [PATCH 364/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.13 (#974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.12` -> `1.120.13` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/compatibility-slim/1.120.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/confidence-slim/1.120.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.13`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112013-httpsgithubcomgoogleapisjava-pubsubcomparev112012v112013-2022-08-24) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.12...v1.120.13) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.7 ([#​1254](https://togithub.com/googleapis/java-pubsub/issues/1254)) ([775c993](https://togithub.com/googleapis/java-pubsub/commit/775c99353d96bcbc0704626999a7af79cf0e557f))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index de37f08b09b..d8a7adf956b 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 51368b11dfc..46211b4eb79 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 junit From f622a53e822050b911e52f8ca0d607856aebe969 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 31 Aug 2022 22:46:15 +0200 Subject: [PATCH 365/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#975) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 05e99c87d11..6eb32aa9470 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import From 85d9441721dd8d88f5a5e1f95a51743de4da4cda Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Thu, 1 Sep 2022 12:06:31 -0400 Subject: [PATCH 366/406] fix: update DeIdentificationTest (#976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: update DeIdentificationTest * temp test * updating tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). * fix tests Co-authored-by: Owl Bot Co-authored-by: WhiteSource Renovate --- .../src/test/java/dlp/snippets/DeIdentificationTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java index 3f4f7683335..e691444ec81 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java @@ -311,7 +311,7 @@ public void testDeIdentifyTableInfoTypes() throws IOException { .addValues( Value.newBuilder() .setStringValue( - "[PERSON_NAME] name was a curse invented by Shakespeare.") + "[PERSON_NAME] name was a curse invented by [PERSON_NAME].") .build()) .build()) .addRows( @@ -447,7 +447,7 @@ public void testDeIdentifyTableConditionsInfoTypes() throws IOException { .addValues( Value.newBuilder() .setStringValue( - "[PERSON_NAME] name was a curse invented by Shakespeare.") + "[PERSON_NAME] name was a curse invented by [PERSON_NAME].") .build()) .build()) .addRows( From f06b044c67525257229dcc27454492149a53ceac Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 14:40:22 +0000 Subject: [PATCH 367/406] chore(main): release 3.6.8-SNAPSHOT (#962) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 46211b4eb79..257507e8ca5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.7 + 3.6.8-SNAPSHOT From 84ff6351b613f17b4b83049e9d6c5c97976628d2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 10 Sep 2022 22:34:21 +0200 Subject: [PATCH 368/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.14 (#982) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.13` -> `1.120.14` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/compatibility-slim/1.120.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/confidence-slim/1.120.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.14`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112014-httpsgithubcomgoogleapisjava-pubsubcomparev112013v112014-2022-09-10) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.13...v1.120.14) ##### Dependencies - Update dependency com.google.cloud:google-cloud-bigquery to v2.15.0 ([#​1259](https://togithub.com/googleapis/java-pubsub/issues/1259)) ([257cb8f](https://togithub.com/googleapis/java-pubsub/commit/257cb8f1b38a885dc4c8fb473a79fee1f01a2b57)) - Update dependency com.google.cloud:google-cloud-core to v2.8.10 ([#​1258](https://togithub.com/googleapis/java-pubsub/issues/1258)) ([37e0034](https://togithub.com/googleapis/java-pubsub/commit/37e0034660855fc327d3843f8aa78bcda03fe158)) - Update dependency com.google.cloud:google-cloud-core to v2.8.11 ([#​1264](https://togithub.com/googleapis/java-pubsub/issues/1264)) ([a19bc7a](https://togithub.com/googleapis/java-pubsub/commit/a19bc7a6bd54a9223575c23df1cac7b2583eb61a)) - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#​1265](https://togithub.com/googleapis/java-pubsub/issues/1265)) ([52da9da](https://togithub.com/googleapis/java-pubsub/commit/52da9dae19399e03af8d20c0c29aa600b7e31ed3))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d8a7adf956b..9dfe00d7efd 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 257507e8ca5..13d77a8bee4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 junit From a244aa17d13ef87e269ac2f22662323dc06ae832 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 16:10:15 +0000 Subject: [PATCH 369/406] chore(main): release 3.7.0 (#978) :robot: I have created a release *beep* *boop* --- ## [3.7.0](https://github.com/googleapis/java-dlp/compare/v3.6.7...v3.7.0) (2022-09-15) ### Features * Add Deidentify action ([#977](https://github.com/googleapis/java-dlp/issues/977)) ([cd0271d](https://github.com/googleapis/java-dlp/commit/cd0271d9a92267855f2073941325b964e484248a)) ### Bug Fixes * Update DeIdentificationTest ([#976](https://github.com/googleapis/java-dlp/issues/976)) ([38a3636](https://github.com/googleapis/java-dlp/commit/38a3636274e40d76219ec745ed19ed9eed4f44d2)) ### Dependencies * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.11 ([#960](https://github.com/googleapis/java-dlp/issues/960)) ([2b588be](https://github.com/googleapis/java-dlp/commit/2b588be096488303bec48ea226c7825ce27f78b3)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.12 ([#969](https://github.com/googleapis/java-dlp/issues/969)) ([d944dbf](https://github.com/googleapis/java-dlp/commit/d944dbf3649465ac4b03b1f1a806ff5deabfb580)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.13 ([#974](https://github.com/googleapis/java-dlp/issues/974)) ([958c2de](https://github.com/googleapis/java-dlp/commit/958c2def31a2d76df46f879684d98ca571acc45e)) * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.14 ([#982](https://github.com/googleapis/java-dlp/issues/982)) ([72292a6](https://github.com/googleapis/java-dlp/commit/72292a64b07b98549dc8ea7a02134a38361dbf06)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#980](https://github.com/googleapis/java-dlp/issues/980)) ([efb18ab](https://github.com/googleapis/java-dlp/commit/efb18abf70a30721412ab07f2fa547b7e221a815)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#984](https://github.com/googleapis/java-dlp/issues/984)) ([2aeeea3](https://github.com/googleapis/java-dlp/commit/2aeeea30464e70734ed9a845f6e2294ffd44f420)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 13d77a8bee4..692f70c7e69 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.6.8-SNAPSHOT + 3.7.0 From 83e0fbf251ae5315e8c57f1d0c1fc6d04ca5a0e5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 16:16:25 +0000 Subject: [PATCH 370/406] chore(main): release 3.7.1-SNAPSHOT (#985) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 692f70c7e69..0f243e5b7b1 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.0 + 3.7.1-SNAPSHOT From 6637caea280866508a12de187be54d94b164ab3c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:00:20 +0200 Subject: [PATCH 371/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.0 (#986) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.6.7` -> `3.7.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.0/compatibility-slim/3.6.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.0/confidence-slim/3.6.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9dfe00d7efd..0aa1edb405e 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.6.7 + 3.7.0 From a4f5c1e76b9bbff1ff5da537388023be49f0875a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:12:13 +0200 Subject: [PATCH 372/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.16 (#983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.14` -> `1.120.16` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.16/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.16/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.16/compatibility-slim/1.120.14)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.16/confidence-slim/1.120.14)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0aa1edb405e..08c5e18dc19 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.14 + 1.120.16 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 0f243e5b7b1..10ff50fea0d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.14 + 1.120.16 junit From 31d00ed5003ca729e46054fbe8bc2b08c51de2c0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 14:28:35 +0000 Subject: [PATCH 373/406] chore(main): release 3.7.1 (#988) :robot: I have created a release *beep* *boop* --- ## [3.7.1](https://github.com/googleapis/java-dlp/compare/v3.7.0...v3.7.1) (2022-09-20) ### Dependencies * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.16 ([#983](https://github.com/googleapis/java-dlp/issues/983)) ([692695d](https://github.com/googleapis/java-dlp/commit/692695d57e159bcb5ae5059d636199933240a0ed)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 10ff50fea0d..2df103a66ff 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.1-SNAPSHOT + 3.7.1 From c01668128251239caf87481322788ece30ced1a4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 17:06:25 +0200 Subject: [PATCH 374/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#987) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 6eb32aa9470..1d9f9c008ea 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.2 pom import From 9c04574100b8e399cdd6bb14637b0a3f85266da2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 15:12:14 +0000 Subject: [PATCH 375/406] chore(main): release 3.7.2-SNAPSHOT (#989) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2df103a66ff..839d35423a4 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.1 + 3.7.2-SNAPSHOT From 26a3d2ad4ccb0e761d6d0dd56576f3784a10f180 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 22:04:17 +0200 Subject: [PATCH 376/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.1 (#990) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.0` -> `3.7.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.1/compatibility-slim/3.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.1/confidence-slim/3.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-dlp ### [`v3.7.1`](https://togithub.com/googleapis/java-dlp/blob/HEAD/CHANGELOG.md#​371-httpsgithubcomgoogleapisjava-dlpcomparev370v371-2022-09-20) [Compare Source](https://togithub.com/googleapis/java-dlp/compare/v3.7.0...v3.7.1) ##### Dependencies - Update dependency com.google.cloud:google-cloud-pubsub to v1.120.16 ([#​983](https://togithub.com/googleapis/java-dlp/issues/983)) ([692695d](https://togithub.com/googleapis/java-dlp/commit/692695d57e159bcb5ae5059d636199933240a0ed))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 08c5e18dc19..9b1e9b1e350 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.0 + 3.7.1 From 475855f06d80859643c3bfd634ba26e8b6266e4f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 22:10:28 +0200 Subject: [PATCH 377/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.17 (#991) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.16` -> `1.120.17` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.17/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.17/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.17/compatibility-slim/1.120.16)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.17/confidence-slim/1.120.16)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 9b1e9b1e350..5bc3d9e14e1 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.16 + 1.120.17 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 839d35423a4..014b0cef81d 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.16 + 1.120.17 junit From 9dd7b219d4a63719f1035676b71199c65df2d529 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 20:22:28 +0000 Subject: [PATCH 378/406] chore(main): release 3.7.2 (#992) :robot: I have created a release *beep* *boop* --- ## [3.7.2](https://github.com/googleapis/java-dlp/compare/v3.7.1...v3.7.2) (2022-09-20) ### Dependencies * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.17 ([#991](https://github.com/googleapis/java-dlp/issues/991)) ([cda3399](https://github.com/googleapis/java-dlp/commit/cda3399fa8a9d0d98978aec38211931738b83d76)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 014b0cef81d..08c0130a403 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.2-SNAPSHOT + 3.7.2 From ae27ca0f78f41a4cef8ca29c5d69e32ee94dfdf4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 20:32:27 +0000 Subject: [PATCH 379/406] chore(main): release 3.7.3-SNAPSHOT (#993) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 08c0130a403..2e058824000 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.2 + 3.7.3-SNAPSHOT From 6a61a1fe3b682be90b32e53394664e990778288f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Sep 2022 16:22:35 +0200 Subject: [PATCH 380/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.2 (#994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.1` -> `3.7.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.2/compatibility-slim/3.7.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.2/confidence-slim/3.7.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 5bc3d9e14e1..0a3b34bccb3 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.1 + 3.7.2 From d858c2c9558513281210c5eeb7cc97247e15940c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Sep 2022 18:02:40 +0200 Subject: [PATCH 381/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.18 (#995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.17` -> `1.120.18` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.18/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.18/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.18/compatibility-slim/1.120.17)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.18/confidence-slim/1.120.17)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.18`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112018-httpsgithubcomgoogleapisjava-pubsubcomparev112017v112018-2022-09-21) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.17...v1.120.18) ##### Dependencies - Update dependency com.google.cloud:google-cloud-core to v2.8.13 ([#​1288](https://togithub.com/googleapis/java-pubsub/issues/1288)) ([708a1df](https://togithub.com/googleapis/java-pubsub/commit/708a1df692b64d86915133ac4ae87e45f4d669d8)) - Update dependency com.google.cloud:google-cloud-core to v2.8.14 ([#​1291](https://togithub.com/googleapis/java-pubsub/issues/1291)) ([1c479de](https://togithub.com/googleapis/java-pubsub/commit/1c479de525a28fc323697d9a4e92f6ee3215a18f)) - Update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 ([#​1289](https://togithub.com/googleapis/java-pubsub/issues/1289)) ([216ba7d](https://togithub.com/googleapis/java-pubsub/commit/216ba7db4f0fab29c4bf9fc785387b23f64beb5e))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 0a3b34bccb3..047fe9d00d5 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.17 + 1.120.18 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2e058824000..5a60796173c 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.17 + 1.120.18 junit From 3d6ad25e318f90db44dd56bb9815501db64f077d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 16:12:27 +0000 Subject: [PATCH 382/406] chore(main): release 3.7.3 (#996) :robot: I have created a release *beep* *boop* --- ## [3.7.3](https://github.com/googleapis/java-dlp/compare/v3.7.2...v3.7.3) (2022-09-22) ### Dependencies * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.18 ([#995](https://github.com/googleapis/java-dlp/issues/995)) ([0b3796d](https://github.com/googleapis/java-dlp/commit/0b3796d78eefb1da74806170e2566c2301aa5d93)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 5a60796173c..2113f37e1c2 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.3-SNAPSHOT + 3.7.3 From 89fbb7393bb619efff712eefa3f1383b9f21fbf4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 16:20:22 +0000 Subject: [PATCH 383/406] chore(main): release 3.7.4-SNAPSHOT (#997) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 2113f37e1c2..7c726de349e 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.3 + 3.7.4-SNAPSHOT From 0e2d46224959e9580f1311b16ea557bdafdd7067 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 23 Sep 2022 16:50:23 +0200 Subject: [PATCH 384/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.3 (#998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.2` -> `3.7.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.3/compatibility-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.3/confidence-slim/3.7.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 047fe9d00d5..a246c5b2879 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.2 + 3.7.3 From 51a3317709665a36afbc06efa3e83a52c0eac260 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:52:28 +0000 Subject: [PATCH 385/406] chore(main): release 3.7.4 (#1022) :robot: I have created a release *beep* *boop* --- ## [3.7.4](https://togithub.com/googleapis/java-dlp/compare/v3.7.3...v3.7.4) (2022-10-03) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#1021](https://togithub.com/googleapis/java-dlp/issues/1021)) ([dc6c270](https://togithub.com/googleapis/java-dlp/commit/dc6c2704358015046b86c193b4b3373f26648855)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 7c726de349e..57eaff00f4b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.4-SNAPSHOT + 3.7.4 From 2ba3e20e52a36985155baa746fe528cc23543108 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 14:02:25 +0000 Subject: [PATCH 386/406] chore(main): release 3.7.5-SNAPSHOT (#1023) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 57eaff00f4b..791999309c5 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.4 + 3.7.5-SNAPSHOT From d6953d1a2fc04e8c90ecb184b4916ae826066447 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 18:30:17 +0000 Subject: [PATCH 387/406] chore(main): release 3.7.5 (#1025) :robot: I have created a release *beep* *boop* --- ## [3.7.5](https://togithub.com/googleapis/java-dlp/compare/v3.7.4...v3.7.5) (2022-10-03) ### Bug Fixes * deprecate extra field to avoid confusion ([f5ee046](https://togithub.com/googleapis/java-dlp/commit/f5ee046bdc40c60d2b3683c63d200532dfd2850d)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 791999309c5..5fa9b051cad 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.5-SNAPSHOT + 3.7.5 From 884c280aa153c24a4b1b41fbc603afb0ef912e4d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 19:34:21 +0000 Subject: [PATCH 388/406] chore(main): release 3.7.6-SNAPSHOT (#1027) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 5fa9b051cad..b523f725170 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.5 + 3.7.6-SNAPSHOT From 7c9975d2155f1bde6f16c55e47708a3f630f90ec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Oct 2022 03:28:27 +0200 Subject: [PATCH 389/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.4 (#1024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.3` -> `3.7.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/compatibility-slim/3.7.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/confidence-slim/3.7.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a246c5b2879..a69ea7db9bf 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.3 + 3.7.4 From 4e95364901ba68c45af97f72883388280cd6ae77 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Oct 2022 05:24:16 +0200 Subject: [PATCH 390/406] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.120.20 (#1026) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.18` -> `1.120.20` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.20/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.20/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.20/compatibility-slim/1.120.18)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.20/confidence-slim/1.120.18)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index a69ea7db9bf..d415ef5994c 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-pubsub - 1.120.18 + 1.120.20 junit diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index b523f725170..25c8650e55c 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-pubsub - 1.120.18 + 1.120.20 junit From 6c5cfe02860c703b5b1f5a4c8093094a8480d8c1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Oct 2022 17:16:18 +0200 Subject: [PATCH 391/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.5 (#1028) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.4` -> `3.7.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/compatibility-slim/3.7.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.5/confidence-slim/3.7.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index d415ef5994c..99549590be3 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.4 + 3.7.5 From 84ff03b3a8bb542ac8d1bfae3994a285c5a389b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Oct 2022 20:02:25 +0200 Subject: [PATCH 392/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#1030) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 1d9f9c008ea..e511515e300 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.2 + 26.1.3 pom import From 9dd77183558feacfd10af33b054d2d5939dbf908 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Oct 2022 18:12:22 +0000 Subject: [PATCH 393/406] chore(main): release 3.7.6 (#1029) :robot: I have created a release *beep* *boop* --- ## [3.7.6](https://togithub.com/googleapis/java-dlp/compare/v3.7.5...v3.7.6) (2022-10-07) ### Dependencies * Update dependency com.google.cloud:google-cloud-pubsub to v1.120.20 ([#1026](https://togithub.com/googleapis/java-dlp/issues/1026)) ([ee817bd](https://togithub.com/googleapis/java-dlp/commit/ee817bd7f607c137b7a6f3531475fec75ae3c9d2)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index 25c8650e55c..f8278219260 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.6-SNAPSHOT + 3.7.6 From 53a5d641c2bebda7907bd1f09cd149c24b8da7ae Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Oct 2022 18:20:22 +0000 Subject: [PATCH 394/406] chore(main): release 3.7.7-SNAPSHOT (#1031) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- dlp/snippets/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f8278219260..f41ff84f7d8 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.6 + 3.7.7-SNAPSHOT From f28c7df62e002efe4fa047fa5794c652220650a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Oct 2022 16:16:17 +0200 Subject: [PATCH 395/406] chore(deps): update dependency com.google.cloud:google-cloud-dlp to v3.7.6 (#1032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-dlp](https://togithub.com/googleapis/java-dlp) | `3.7.5` -> `3.7.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.6/compatibility-slim/3.7.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-dlp/3.7.6/confidence-slim/3.7.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 99549590be3..54ba071af59 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.5 + 3.7.6 From f5ce9e1c2d197d4ef423ca4b0fc2fcd45d8f65bc Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 8 Nov 2022 19:40:19 +0100 Subject: [PATCH 396/406] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 (#1046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.3` -> `26.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/compatibility-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/confidence-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). --- dlp/snippets/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index e511515e300..c25e5189247 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.3 + 26.1.4 pom import From 5371ee2cafdb777d36ee90c1ea104338679fd646 Mon Sep 17 00:00:00 2001 From: SitaLakshmi Date: Wed, 8 Feb 2023 15:40:38 -0500 Subject: [PATCH 397/406] fix resource leakage in test --- dlp/snippets/snippets/pom.xml | 1 + .../dlp/snippets/InspectBigQueryTable.java | 2 ++ .../InspectBigQueryTableWithSampling.java | 2 ++ .../dlp/snippets/InspectDatastoreEntity.java | 2 ++ .../java/dlp/snippets/InspectGcsFile.java | 2 ++ .../snippets/InspectGcsFileWithSampling.java | 2 ++ .../RiskAnalysisCategoricalStats.java | 2 ++ .../dlp/snippets/RiskAnalysisKAnonymity.java | 2 ++ .../java/dlp/snippets/RiskAnalysisKMap.java | 2 ++ .../dlp/snippets/RiskAnalysisLDiversity.java | 2 ++ .../snippets/RiskAnalysisNumericalStats.java | 2 ++ .../test/java/dlp/snippets/InspectTests.java | 21 ++++++++++--------- 12 files changed, 32 insertions(+), 10 deletions(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index c25e5189247..3b391326c98 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -41,6 +41,7 @@ com.google.cloud google-cloud-dlp + 3.12.0 diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index ac6335c8064..f8ca7e1f423 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -157,6 +157,8 @@ public static void inspectBigQueryTable( System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } + // Delete DLP job. + dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java index 0c560653959..dabe4fc998e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -152,6 +152,8 @@ public static void inspectBigQueryTableWithSampling( System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } + // Delete DLP job. + dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index a37d2f1873b..dc63a686ae3 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -158,6 +158,8 @@ public static void insepctDatastoreEntity( System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } + // Delete DLP job. + dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index d6efdfa9fbc..7fcff8c2dfa 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -145,6 +145,8 @@ public static void inspectGcsFile( System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } + // Delete DLP job. + dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java index 1c08e508419..221adca3635 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -153,6 +153,8 @@ public static void inspectGcsFileWithSampling( System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } + // Delete DLP job. + dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index 3a80fb2e5f1..bab755bb118 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -158,6 +158,8 @@ public static void categoricalStatsAnalysis( valueFrequency.getValue().toString(), valueFrequency.getCount()); } } + // Delete DLP job. + dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index d0ac6b75e62..b532e06dc66 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -167,6 +167,8 @@ public static void calculateKAnonymity( System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); } } + // Delete DLP job. + dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index 5bafb93b26e..46deb73065d 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -197,6 +197,8 @@ public static void calculateKMap( "\tEstimated k-map anonymity: %d\n", valueBucket.getEstimatedAnonymity()); } } + // Delete DLP job. + dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 48fdbf70ea8..42d0f7b10d4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -190,6 +190,8 @@ public static void calculateLDiversity( } } } + // Delete DLP job. + dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index dde9467f90d..c27ba1a575e 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -155,6 +155,8 @@ public static void numericalStatsAnalysis( } lastValue = currentValue; } + // Delete DLP job. + dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index 65ad56e9893..d5dc0a3113b 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -31,8 +31,8 @@ import com.google.pubsub.v1.TopicName; import java.util.Arrays; import java.util.UUID; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -45,10 +45,10 @@ public class InspectTests extends TestBase { private static final String datastoreKind = "dlp"; private static final String DOCUMENT_INPUT_FILE = "src/test/resources/sensitive-data-image.jpg"; - private UUID testRunUuid = UUID.randomUUID(); - private TopicName topicName = - TopicName.of(PROJECT_ID, String.format("%s-%s", TOPIC_ID, testRunUuid.toString())); - private ProjectSubscriptionName subscriptionName = + private static final UUID testRunUuid = UUID.randomUUID(); + private static final TopicName topicName = + TopicName.of(PROJECT_ID, String.format("%s-%s", TOPIC_ID, testRunUuid)); + private static final ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of( PROJECT_ID, String.format("%s-%s", SUBSCRIPTION_ID, testRunUuid.toString())); @@ -64,8 +64,8 @@ protected ImmutableList requiredEnvVars() { "BIGQUERY_TABLE"); } - @Before - public void before() throws Exception { + @BeforeClass + public static void before() throws Exception { // Create a new topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.createTopic(topicName); @@ -78,8 +78,8 @@ public void before() throws Exception { } } - @After - public void after() throws Exception { + @AfterClass + public static void after() throws Exception { // Delete the test topic try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) { topicAdminClient.deleteTopic(topicName); @@ -99,6 +99,7 @@ public void after() throws Exception { } } + @Test public void testInspectPhoneNumber() throws Exception { InspectString.inspectString(PROJECT_ID, "My phone number is (415) 555-0890"); From 7dce4f7ad6e4d667429031422bb82de066d66963 Mon Sep 17 00:00:00 2001 From: SitaLakshmi Date: Wed, 8 Feb 2023 22:14:34 -0500 Subject: [PATCH 398/406] try direct versioning --- dlp/snippets/snippets/pom.xml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml index 3b391326c98..cd074dabda9 100644 --- a/dlp/snippets/snippets/pom.xml +++ b/dlp/snippets/snippets/pom.xml @@ -24,19 +24,6 @@
- - - - - com.google.cloud - libraries-bom - 26.1.4 - pom - import - - - - com.google.cloud @@ -47,6 +34,7 @@ com.google.cloud google-cloud-pubsub + 1.120.24 junit From b09f3c38256e5bca39eff718bfba2e04167fc2c8 Mon Sep 17 00:00:00 2001 From: SitaLakshmi Date: Wed, 15 Feb 2023 11:48:02 -0500 Subject: [PATCH 399/406] updated dlp version --- dlp/snippets/install-without-bom/pom.xml | 2 +- dlp/snippets/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 54ba071af59..870313dc2ce 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-dlp - 3.7.6 + 3.12.0 diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index f41ff84f7d8..ac33befce2a 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-dlp - 3.7.7-SNAPSHOT + 3.12.0 From 21e979e831b8062f92bd3b5be8062eab69d6ad1d Mon Sep 17 00:00:00 2001 From: SitaLakshmi Date: Wed, 15 Feb 2023 12:20:29 -0500 Subject: [PATCH 400/406] remove default build test config --- dlp/snippets/install-without-bom/pom.xml | 35 ------------------------ dlp/snippets/snapshot/pom.xml | 35 ------------------------ 2 files changed, 70 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 870313dc2ce..6ca6f265d59 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -51,39 +51,4 @@ test - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml index ac33befce2a..12366ed492b 100644 --- a/dlp/snippets/snapshot/pom.xml +++ b/dlp/snippets/snapshot/pom.xml @@ -50,39 +50,4 @@ test
- - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - \ No newline at end of file From b4eadd2b6569be1c3160ed23a978da121244ac34 Mon Sep 17 00:00:00 2001 From: Sita Lakshmi Sangameswaran Date: Thu, 16 Feb 2023 00:02:57 +0530 Subject: [PATCH 401/406] updated region tag mismatch --- .../src/main/java/dlp/snippets/DeIdentifyWithInfoType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java index bc830dcde1d..0053ab696be 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java @@ -92,4 +92,4 @@ public static void deIdentifyWithInfoType(String projectId, String textToRedact) } } } -// [END dlp_deidentify_replace] +// [END dlp_deidentify_infotype] From 9c88f972057e4a28daec6ff34e06418dcfbfe56e Mon Sep 17 00:00:00 2001 From: SitaLakshmi Date: Wed, 15 Feb 2023 14:40:26 -0500 Subject: [PATCH 402/406] refactor tests --- .../dlp/snippets/InspectBigQueryTable.java | 3 +- .../InspectBigQueryTableWithSampling.java | 3 +- .../dlp/snippets/InspectDatastoreEntity.java | 3 +- .../java/dlp/snippets/InspectGcsFile.java | 3 +- .../snippets/InspectGcsFileWithSampling.java | 3 +- .../RiskAnalysisCategoricalStats.java | 3 +- .../dlp/snippets/RiskAnalysisKAnonymity.java | 3 +- .../java/dlp/snippets/RiskAnalysisKMap.java | 3 +- .../dlp/snippets/RiskAnalysisLDiversity.java | 3 +- .../snippets/RiskAnalysisNumericalStats.java | 3 +- .../test/java/dlp/snippets/InspectTests.java | 41 ++++++++++++++++++ .../java/dlp/snippets/RiskAnalysisTests.java | 42 +++++++++++++++++++ 12 files changed, 93 insertions(+), 20 deletions(-) diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java index f8ca7e1f423..3d7c31203fa 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java @@ -151,14 +151,13 @@ public static void inspectBigQueryTable( // Parse the response and process results. System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); System.out.println("Findings: "); for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } - // Delete DLP job. - dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java index dabe4fc998e..30e3f5ec663 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java @@ -146,14 +146,13 @@ public static void inspectBigQueryTableWithSampling( // Parse the response and process results. System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); System.out.println("Findings: "); for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } - // Delete DLP job. - dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java index dc63a686ae3..c70f22bd3a4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java @@ -152,14 +152,13 @@ public static void insepctDatastoreEntity( // Parse the response and process results. System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); System.out.println("Findings: "); for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } - // Delete DLP job. - dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java index 7fcff8c2dfa..758464dc17b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java @@ -139,14 +139,13 @@ public static void inspectGcsFile( // Parse the response and process results. System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); System.out.println("Findings: "); for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } - // Delete DLP job. - dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java index 221adca3635..1c4078587d4 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java @@ -147,14 +147,13 @@ public static void inspectGcsFileWithSampling( // Parse the response and process results. System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); InspectDataSourceDetails.Result result = completedJob.getInspectDetails().getResult(); System.out.println("Findings: "); for (InfoTypeStats infoTypeStat : result.getInfoTypeStatsList()) { System.out.print("\tInfo type: " + infoTypeStat.getInfoType().getName()); System.out.println("\tCount: " + infoTypeStat.getCount()); } - // Delete DLP job. - dlp.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java index bab755bb118..a290281a52f 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java @@ -139,6 +139,7 @@ public static void categoricalStatsAnalysis( // Retrieve completed job status DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); // Get the result and parse through and process the information CategoricalStatsResult result = completedJob.getRiskDetails().getCategoricalStatsResult(); @@ -158,8 +159,6 @@ public static void categoricalStatsAnalysis( valueFrequency.getValue().toString(), valueFrequency.getCount()); } } - // Delete DLP job. - dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java index b532e06dc66..f9c29a0e932 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java @@ -147,6 +147,7 @@ public static void calculateKAnonymity( // Retrieve completed job status DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); // Get the result and parse through and process the information KAnonymityResult kanonymityResult = completedJob.getRiskDetails().getKAnonymityResult(); @@ -167,8 +168,6 @@ public static void calculateKAnonymity( System.out.println("\tClass size: " + bucket.getEquivalenceClassSize()); } } - // Delete DLP job. - dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java index 46deb73065d..9dae52ac67a 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java @@ -173,6 +173,7 @@ public static void calculateKMap( // Retrieve completed job status DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); // Get the result and parse through and process the information KMapEstimationResult kmapResult = completedJob.getRiskDetails().getKMapEstimationResult(); @@ -197,8 +198,6 @@ public static void calculateKMap( "\tEstimated k-map anonymity: %d\n", valueBucket.getEstimatedAnonymity()); } } - // Delete DLP job. - dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java index 42d0f7b10d4..2650668574b 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java @@ -168,6 +168,7 @@ public static void calculateLDiversity( // Retrieve completed job status DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); // Get the result and parse through and process the information LDiversityResult ldiversityResult = completedJob.getRiskDetails().getLDiversityResult(); @@ -190,8 +191,6 @@ public static void calculateLDiversity( } } } - // Delete DLP job. - dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java index c27ba1a575e..b54f551eff6 100644 --- a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java +++ b/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java @@ -138,6 +138,7 @@ public static void numericalStatsAnalysis( // Retrieve completed job status DlpJob completedJob = dlpServiceClient.getDlpJob(getDlpJobRequest); System.out.println("Job status: " + completedJob.getState()); + System.out.println("Job name: " + dlpJob.getName()); // Get the result and parse through and process the information NumericalStatsResult result = completedJob.getRiskDetails().getNumericalStatsResult(); @@ -155,8 +156,6 @@ public static void numericalStatsAnalysis( } lastValue = currentValue; } - // Delete DLP job. - dlpServiceClient.deleteDlpJob(dlpJob.getName()); } } diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java index d5dc0a3113b..7ed5f4787be 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java @@ -19,6 +19,7 @@ import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.ApiException; +import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; import com.google.common.collect.ImmutableList; @@ -312,6 +313,14 @@ public void testInspectGcsFile() throws Exception { String output = bout.toString(); assertThat(output).contains("Job status: DONE"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -321,6 +330,14 @@ public void testInspectGcsFileWithSampling() throws Exception { String output = bout.toString(); assertThat(output).contains("Job status: DONE"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -334,6 +351,14 @@ public void testInspectDatastoreEntity() throws Exception { String output = bout.toString(); assertThat(output).contains("Job status: DONE"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -343,6 +368,14 @@ public void testInspectBigQueryTable() throws Exception { String output = bout.toString(); assertThat(output).contains("Job status: DONE"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -352,6 +385,14 @@ public void testInspectBigQueryTableWithSampling() throws Exception { String output = bout.toString(); assertThat(output).contains("Job status: DONE"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java index 548f2bfe068..034ee2d9808 100644 --- a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java +++ b/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java @@ -19,12 +19,14 @@ import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.rpc.ApiException; +import com.google.cloud.dlp.v2.DlpServiceClient; import com.google.cloud.pubsub.v1.SubscriptionAdminClient; import com.google.cloud.pubsub.v1.TopicAdminClient; import com.google.common.collect.ImmutableList; import com.google.pubsub.v1.ProjectSubscriptionName; import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.TopicName; +import java.util.Arrays; import java.util.UUID; import org.junit.After; import org.junit.Before; @@ -94,6 +96,14 @@ public void testNumericalStats() throws Exception { PROJECT_ID, DATASET_ID, TABLE_ID, topicName.getTopic(), subscriptionName.getSubscription()); String output = bout.toString(); assertThat(output).contains("Value at "); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -105,6 +115,14 @@ public void testCategoricalStats() throws Exception { assertThat(output).containsMatch("Most common value occurs \\d time"); assertThat(output).containsMatch("Least common value occurs \\d time"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -115,6 +133,14 @@ public void testKAnonymity() throws Exception { assertThat(output).containsMatch("Bucket size range: \\[\\d, \\d\\]"); assertThat(output).contains("Quasi-ID values: integer_value: 19"); assertThat(output).contains("Class size: 1"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -125,6 +151,14 @@ public void testLDiversity() throws Exception { assertThat(output).contains("Quasi-ID values: integer_value: 19"); assertThat(output).contains("Class size: 1"); assertThat(output).contains("Sensitive value string_value: \"James\""); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } @Test @@ -137,5 +171,13 @@ public void testKMap() throws Exception { assertThat(output).containsMatch("Anonymity range: \\[\\d, \\d]"); assertThat(output).containsMatch("Size: \\d"); assertThat(output).containsMatch("Values: \\{\\d{2}, \"Female\"\\}"); + String jobName = Arrays.stream(output.split("\n")) + .filter(line -> line.contains("Job name:")) + .findFirst() + .get(); + jobName = jobName.split(":")[1].trim(); + try (DlpServiceClient dlp = DlpServiceClient.create()) { + dlp.deleteDlpJob(jobName); + } } } From 422ade4537236373694328bef3dfffbb04a1da19 Mon Sep 17 00:00:00 2001 From: Sita Lakshmi Sangameswaran Date: Thu, 16 Feb 2023 02:11:38 +0530 Subject: [PATCH 403/406] updated artifact references --- dlp/snippets/install-without-bom/pom.xml | 4 ++-- dlp/snippets/snapshot/pom.xml | 4 ++-- dlp/snippets/snippets/pom.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlp/snippets/install-without-bom/pom.xml b/dlp/snippets/install-without-bom/pom.xml index 6ca6f265d59..d499f7bbc66 100644 --- a/dlp/snippets/install-without-bom/pom.xml +++ b/dlp/snippets/install-without-bom/pom.xml @@ -1,11 +1,11 @@ 4.0.0 - com.google.cloud + com.example.dlp dlp-install-without-bom jar Google Cloud Data Loss Prevention Install Without Bom - https://github.com/googleapis/java-dlp + https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/dlp - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - com.google.cloud - google-cloud-dlp - 3.12.0 - - - - - com.google.cloud - google-cloud-pubsub - 1.120.20 - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 8f707e2876f..6cfe7f03966 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -1,15 +1,11 @@ 4.0.0 - com.google.cloud - google-cloud-dlp-samples - 0.0.1-SNAPSHOT - pom - Google Cloud Data Loss Prevention Samples Parent - https://github.com/googleapis/java-dlp - - Java idiomatic client for Google Cloud Platform services. - + com.example.dlp + dlp-snippets + jar + Google Cloud Data Loss Prevention Snippets + https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/dlp + + com.google.cloud + google-cloud-pubsub + 1.120.24 + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + + + diff --git a/dlp/snippets/snapshot/pom.xml b/dlp/snippets/snapshot/pom.xml deleted file mode 100644 index 0b9058e4d1e..00000000000 --- a/dlp/snippets/snapshot/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - 4.0.0 - com.example.dlp - dlp-snapshot - jar - Google Cloud Data Loss Prevention Snapshot Samples - https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/dlp - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-dlp - 3.12.0 - - - - - com.google.cloud - google-cloud-pubsub - 1.120.20 - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - \ No newline at end of file diff --git a/dlp/snippets/snapshot/src/test/resources/dates.csv b/dlp/snippets/snapshot/src/test/resources/dates.csv deleted file mode 100644 index 290a85dec68..00000000000 --- a/dlp/snippets/snapshot/src/test/resources/dates.csv +++ /dev/null @@ -1,5 +0,0 @@ -name,birth_date,credit_card,register_date -Ann,01/01/1970,4532908762519852,07/21/1996 -James,03/06/1988,4301261899725540,04/09/2001 -Dan,08/14/1945,4620761856015295,11/15/2011 -Laura,11/03/1992,4564981067258901,01/04/2017 diff --git a/dlp/snippets/snapshot/src/test/resources/results.correct.csv b/dlp/snippets/snapshot/src/test/resources/results.correct.csv deleted file mode 100644 index 5b078fe825a..00000000000 --- a/dlp/snippets/snapshot/src/test/resources/results.correct.csv +++ /dev/null @@ -1,5 +0,0 @@ -name,birth_date,credit_card,register_date -Ann,1970-01-06,4532908762519852,1996-07-26 -James,1988-03-11,4301261899725540,2001-04-14 -Dan,1945-08-19,4620761856015295,2011-11-20 -Laura,1992-11-08,4564981067258901,2017-01-09 diff --git a/dlp/snippets/snapshot/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/snapshot/src/test/resources/sensitive-data-image.jpg deleted file mode 100644 index 6e2d84546e4c623df6dbc5c9cb45813e468ecf82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78548 zcmeFa2V7Li(l>mDAt)kR1QZEF&IrPg5ff1) z2ML0bGfGY~^PT~9_inhm``o?ncklN;$KRPb^y%*Es;=(o`d4*}{eb-h98;82kOLqP z0JsAF1F)ZgtFkw3tpGq-8Q=r};1B@0XA9tiPhb{+7Q6ufii7}A@Ed|lL*jjZOHhr3 zet(9};4)$t0TDGDXLn~e8|NF$g6H@EkxL57__*4@YybJo{^PM8hR^{7@Em_O;PB&x ztxNvcmjL-8=nO$M6mlBCBZolAA=tM76G)Q)vVZLt13w^mP<#SHqCF!@%I@ zvGIw?sp*;7xvwj$YwH`ETiZK0zCd{%umye|aP|wn$U(mF@bRJeL^!@6cwRWh$?*wJ z@e>}GRwugda^kc=;30}jktxNm4zmbqe4#XR?Ib?QD)jlxR~&2moc%e*g8oOG{b1}T zzJ>r9fPVktqo?P)%*V%f+2}HO8MzzbF85IP{VVj_mA!wx#a+WcE-Y9H*xN zA)#wi2>}UHfBC|G1l7_AI|z_KA)qor$pIKJ%bpqn{J2?IDAc70{`da3%76*m@sCpf zc@O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test/resources/test.png deleted file mode 100644 index 748f46cdcb504479bc1018fa16ab90dfb95aee5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5109 zcmVTfl&E-1Qo{DFY7R7DU7 zO(c{MNKZ&eZ=_E$X_LwHH}C%bNWehe8zux-bm#k5J~#KCd(J)IbMCqKy*DTJMGoP zX`a8rY9QAM>))Rp$a!!9w&Rz)w8EGFu=KHwT=mxMAR&54^8PsB42yf`)iDl_a5;51 zmymc=+-qCbz4Q6s{`$CdknUu({kK|>L5IvA1`pH4zXE>okn{AvKl6k*XU7|-%Z*4f ze(9!FK9zeu+I?O38*2AQfU@$^ab64kpu@RCCr+2#*j}v%007c0a^9ktFh55LQa9vY zJ9a3mUW*wU3HRs~E64b{+lz2_Q$hOigK5<&3;*ndb=Wn!_0Eq+U%$+~Q$C0CJ&QCqMFSAyQ z0gz4j)H(NVZNO5GJeP~+b&CTixu|+)->HneemJ@ z(5T_vg zvUTB8mrbC~ZrPUIu zVM~-V5MGPduHc>iV1Km{05~4=-i{;oZvU~2VeLr&>HqT=rO?l;6hthn~!{1rP zS6tlL)041^n6zL~l&>SHtuH*Y=Uh%Rv)dSl6JAqZ`3rgE?en)xKnBlxeUWPSKQdgO zTQ^y(5V+YiUMnV}qCC3Nc5k~}4*-OH)T%YBMmP|P(zClyr8gMaW+#28ZCK5}mMV-M z?Lw z9uIQ4Sl?*2J|OHyEevi*$}v12-KQ1PM#|X73EYsVD1F9P$IF{BfKsDkmxpN+)nf?9 zb66C&=s=YofMaVTZmYUkqr)^*+^93IaI`}N4)j39=W?2jCXlBkS4>$N4gQ%ETn4tjJ5+cd@9QW+oUCc+Z%>WQMnm zUY=RND63au)bssmlLB$iSr{EmTq2odUalb+lxN|R#b8dh_ez(Gxi54xG+YVF2i? z_$fL1=?EE7)naq6?I!7n`7g{aqY@h%D zxsP3zFr<9Pr*FRee<$056PAZddwaU_3Qla_{N;{xX>U*0F;A`zXgjj&ofkjem2MNe zdbBh9&0qi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+E{_X=UY&@4n6NV(CdYUf;K$7q@)PJ5D@WqpZ(OIhtjG z!gnT8m0UO%zHGyD!xXL6b#mr9^-ky3nl_*KO$!_dMd|6?87&xKaI=#^)7JkvRLBuX zZP2pKeiT)AX3LMcCXx5lnTwy2@_|xT=Kk>QeaZ)YVNPEB)JW%yOL7c=?1o1Vb8#fs zyx3E;((-Gc|NTNYQ=^Koja;~NmXm~s)h(qt2lr;(&et68(E+M!hZ_d|=#{YZow8{5 z5IY{yDr>XPfAd4N9soM?kL{H$UixgJJ*lfNKDpVY3? zS&mM)IVCyk>FMj=8n4o5nrfOl+5JvcTsf37Z{emjlvdN+)@n5O#GD0|MTf;qW>%h& zOF7*bfNr{+ocH|PO<&BT3eRl)GLMPm%rY5mw|qgEEkX?RMof*27-Yy$)mILkk6Zfs zhMAg%jQkqC7pv{;R^9DQsv);v#+=8U3Qw1x`>MQ8zove+bG_!w8>77R#q~~1cV66^ z{oMMw|+Fa%=~-W*f%-e)&719Zwg-b6z0Ij_VzW}Z87 zxw_pzibP1OHuJFX!SOrHpO&0FI1bU1d=%*y?{n_3;#UDyrhfPF!~13mEAzii%ztR& ztguGMqXR9?{^68y zzkl3s^B@DC*!W@;S&_0YrNbH>R#?#&*64V&fO&3{;{W`tn4t8nHX00000NkvXXu0mjfvR)b@ diff --git a/dlp/snippets/snapshot/src/test/resources/test.txt b/dlp/snippets/snapshot/src/test/resources/test.txt deleted file mode 100644 index f30af240c72..00000000000 --- a/dlp/snippets/snapshot/src/test/resources/test.txt +++ /dev/null @@ -1 +0,0 @@ -My phone number is (223) 456-7890 and my email address is gary@example.com. \ No newline at end of file diff --git a/dlp/snippets/snippets/pom.xml b/dlp/snippets/snippets/pom.xml deleted file mode 100644 index 6cfe7f03966..00000000000 --- a/dlp/snippets/snippets/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - 4.0.0 - com.example.dlp - dlp-snippets - jar - Google Cloud Data Loss Prevention Snippets - https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/dlp - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-dlp - 3.12.0 - - - - com.google.cloud - google-cloud-pubsub - 1.120.24 - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - diff --git a/dlp/snippets/snippets/src/test/resources/dates.csv b/dlp/snippets/snippets/src/test/resources/dates.csv deleted file mode 100644 index 290a85dec68..00000000000 --- a/dlp/snippets/snippets/src/test/resources/dates.csv +++ /dev/null @@ -1,5 +0,0 @@ -name,birth_date,credit_card,register_date -Ann,01/01/1970,4532908762519852,07/21/1996 -James,03/06/1988,4301261899725540,04/09/2001 -Dan,08/14/1945,4620761856015295,11/15/2011 -Laura,11/03/1992,4564981067258901,01/04/2017 diff --git a/dlp/snippets/snippets/src/test/resources/results.correct.csv b/dlp/snippets/snippets/src/test/resources/results.correct.csv deleted file mode 100644 index 5b078fe825a..00000000000 --- a/dlp/snippets/snippets/src/test/resources/results.correct.csv +++ /dev/null @@ -1,5 +0,0 @@ -name,birth_date,credit_card,register_date -Ann,1970-01-06,4532908762519852,1996-07-26 -James,1988-03-11,4301261899725540,2001-04-14 -Dan,1945-08-19,4620761856015295,2011-11-20 -Laura,1992-11-08,4564981067258901,2017-01-09 diff --git a/dlp/snippets/snippets/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/snippets/src/test/resources/sensitive-data-image.jpg deleted file mode 100644 index 6e2d84546e4c623df6dbc5c9cb45813e468ecf82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78548 zcmeFa2V7Li(l>mDAt)kR1QZEF&IrPg5ff1) z2ML0bGfGY~^PT~9_inhm``o?ncklN;$KRPb^y%*Es;=(o`d4*}{eb-h98;82kOLqP z0JsAF1F)ZgtFkw3tpGq-8Q=r};1B@0XA9tiPhb{+7Q6ufii7}A@Ed|lL*jjZOHhr3 zet(9};4)$t0TDGDXLn~e8|NF$g6H@Ek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I3r|%?x4tV^Aue zOA`~VNcLoU-^Hw;HJOctnpnM%x3=bCJ=z;)C7`7~>3ShWC$)$up`*QJ>(=Ponu+2U z!sIjU+=G&>pH3c2AGaQT%LOBrNwG+(!uM_mB6JT|=5_%QWoDJb*g62FC0JC!IEEB2 zV;o=VMLuWw5KL5??l$l4b1(h%00TLR?wFjln3PzRg!T(e*}X~Q8`G3WC4R=UYF9ADm7QWo>)JR zg);BZ;$>~gM-OSMp=R?P(<@={od$~80TqV_9?M!yf>Y)h*&_fp^G}WcZ>|6Ter5kX F_HW4}ge(96 diff --git a/dlp/snippets/snippets/src/test/resources/test.png b/dlp/snippets/snippets/src/test/resources/test.png deleted file mode 100644 index 748f46cdcb504479bc1018fa16ab90dfb95aee5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5109 zcmVTfl&E-1Qo{DFY7R7DU7 zO(c{MNKZ&eZ=_E$X_LwHH}C%bNWehe8zux-bm#k5J~#KCd(J)IbMCqKy*DTJMGoP zX`a8rY9QAM>))Rp$a!!9w&Rz)w8EGFu=KHwT=mxMAR&54^8PsB42yf`)iDl_a5;51 zmymc=+-qCbz4Q6s{`$CdknUu({kK|>L5IvA1`pH4zXE>okn{AvKl6k*XU7|-%Z*4f ze(9!FK9zeu+I?O38*2AQfU@$^ab64kpu@RCCr+2#*j}v%007c0a^9ktFh55LQa9vY zJ9a3mUW*wU3HRs~E64b{+lz2_Q$hOigK5<&3;*ndb=Wn!_0Eq+U%$+~Q$C0CJ&QCqMFSAyQ z0gz4j)H(NVZNO5GJeP~+b&CTixu|+)->HneemJ@ z(5T_vg zvUTB8mrbC~ZrPUIu zVM~-V5MGPduHc>iV1Km{05~4=-i{;oZvU~2VeLr&>HqT=rO?l;6hthn~!{1rP zS6tlL)041^n6zL~l&>SHtuH*Y=Uh%Rv)dSl6JAqZ`3rgE?en)xKnBlxeUWPSKQdgO zTQ^y(5V+YiUMnV}qCC3Nc5k~}4*-OH)T%YBMmP|P(zClyr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ippets/snippets/src/test/resources/test.txt b/dlp/snippets/snippets/src/test/resources/test.txt deleted file mode 100644 index f30af240c72..00000000000 --- a/dlp/snippets/snippets/src/test/resources/test.txt +++ /dev/null @@ -1 +0,0 @@ -My phone number is (223) 456-7890 and my email address is gary@example.com. \ No newline at end of file diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableBucketing.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableConditionMasking.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableRowSuppress.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTableWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyTextWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithDateShift.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithExceptionList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithInfoType.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithMasking.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithRedaction.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithReplacement.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java b/dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java rename to dlp/snippets/src/main/java/dlp/snippets/DeIdentifyWithSimpleWordList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java b/dlp/snippets/src/main/java/dlp/snippets/InfoTypesList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InfoTypesList.java rename to dlp/snippets/src/main/java/dlp/snippets/InfoTypesList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java b/dlp/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectBigQueryTable.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java b/dlp/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectBigQueryTableWithSampling.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java b/dlp/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectDatastoreEntity.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java b/dlp/snippets/src/main/java/dlp/snippets/InspectGcsFile.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFile.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectGcsFile.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java b/dlp/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectGcsFileWithSampling.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java b/dlp/snippets/src/main/java/dlp/snippets/InspectImageFile.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFile.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectImageFile.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectImageFileAllInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectImageFileListedInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java b/dlp/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectPhoneNumber.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java b/dlp/snippets/src/main/java/dlp/snippets/InspectString.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectString.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectString.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomExcludingSubstring.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomHotword.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringCustomOmitOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringMultipleRules.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringOmitOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDict.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionDictSubstring.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringWithExclusionRegex.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java b/dlp/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectStringWithoutOverlap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java b/dlp/snippets/src/main/java/dlp/snippets/InspectTable.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTable.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectTable.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java b/dlp/snippets/src/main/java/dlp/snippets/InspectTextFile.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectTextFile.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectTextFile.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java b/dlp/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectWithCustomRegex.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java b/dlp/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java rename to dlp/snippets/src/main/java/dlp/snippets/InspectWithHotwordRules.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java b/dlp/snippets/src/main/java/dlp/snippets/JobsCreate.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/JobsCreate.java rename to dlp/snippets/src/main/java/dlp/snippets/JobsCreate.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java b/dlp/snippets/src/main/java/dlp/snippets/JobsDelete.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/JobsDelete.java rename to dlp/snippets/src/main/java/dlp/snippets/JobsDelete.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java b/dlp/snippets/src/main/java/dlp/snippets/JobsGet.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/JobsGet.java rename to dlp/snippets/src/main/java/dlp/snippets/JobsGet.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java b/dlp/snippets/src/main/java/dlp/snippets/JobsList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/JobsList.java rename to dlp/snippets/src/main/java/dlp/snippets/JobsList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java b/dlp/snippets/src/main/java/dlp/snippets/QuickStart.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/QuickStart.java rename to dlp/snippets/src/main/java/dlp/snippets/QuickStart.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/ReIdentifyTableWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/ReIdentifyTextWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java b/dlp/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java rename to dlp/snippets/src/main/java/dlp/snippets/ReIdentifyWithFpe.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java b/dlp/snippets/src/main/java/dlp/snippets/RedactImageFile.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFile.java rename to dlp/snippets/src/main/java/dlp/snippets/RedactImageFile.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/RedactImageFileAllInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java b/dlp/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java rename to dlp/snippets/src/main/java/dlp/snippets/RedactImageFileAllText.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/RedactImageFileColoredInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java b/dlp/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java rename to dlp/snippets/src/main/java/dlp/snippets/RedactImageFileListedInfoTypes.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java b/dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java rename to dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisCategoricalStats.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java b/dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java rename to dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisKAnonymity.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java b/dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java rename to dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisKMap.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java b/dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java rename to dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisLDiversity.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java b/dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java rename to dlp/snippets/src/main/java/dlp/snippets/RiskAnalysisNumericalStats.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java b/dlp/snippets/src/main/java/dlp/snippets/TemplatesCreate.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesCreate.java rename to dlp/snippets/src/main/java/dlp/snippets/TemplatesCreate.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java b/dlp/snippets/src/main/java/dlp/snippets/TemplatesDelete.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesDelete.java rename to dlp/snippets/src/main/java/dlp/snippets/TemplatesDelete.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java b/dlp/snippets/src/main/java/dlp/snippets/TemplatesList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TemplatesList.java rename to dlp/snippets/src/main/java/dlp/snippets/TemplatesList.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java b/dlp/snippets/src/main/java/dlp/snippets/TriggersCreate.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersCreate.java rename to dlp/snippets/src/main/java/dlp/snippets/TriggersCreate.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java b/dlp/snippets/src/main/java/dlp/snippets/TriggersDelete.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersDelete.java rename to dlp/snippets/src/main/java/dlp/snippets/TriggersDelete.java diff --git a/dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java b/dlp/snippets/src/main/java/dlp/snippets/TriggersList.java similarity index 100% rename from dlp/snippets/snippets/src/main/java/dlp/snippets/TriggersList.java rename to dlp/snippets/src/main/java/dlp/snippets/TriggersList.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java b/dlp/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java rename to dlp/snippets/src/test/java/dlp/snippets/DeIdentificationTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java b/dlp/snippets/src/test/java/dlp/snippets/InfoTypesTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/InfoTypesTests.java rename to dlp/snippets/src/test/java/dlp/snippets/InfoTypesTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java b/dlp/snippets/src/test/java/dlp/snippets/InspectTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/InspectTests.java rename to dlp/snippets/src/test/java/dlp/snippets/InspectTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java b/dlp/snippets/src/test/java/dlp/snippets/JobsTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/JobsTests.java rename to dlp/snippets/src/test/java/dlp/snippets/JobsTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java b/dlp/snippets/src/test/java/dlp/snippets/QuickstartTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/QuickstartTests.java rename to dlp/snippets/src/test/java/dlp/snippets/QuickstartTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java b/dlp/snippets/src/test/java/dlp/snippets/RedactTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/RedactTests.java rename to dlp/snippets/src/test/java/dlp/snippets/RedactTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java b/dlp/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java rename to dlp/snippets/src/test/java/dlp/snippets/RiskAnalysisTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java b/dlp/snippets/src/test/java/dlp/snippets/TemplatesTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/TemplatesTests.java rename to dlp/snippets/src/test/java/dlp/snippets/TemplatesTests.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java b/dlp/snippets/src/test/java/dlp/snippets/TestBase.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/TestBase.java rename to dlp/snippets/src/test/java/dlp/snippets/TestBase.java diff --git a/dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java b/dlp/snippets/src/test/java/dlp/snippets/TriggersTests.java similarity index 100% rename from dlp/snippets/snippets/src/test/java/dlp/snippets/TriggersTests.java rename to dlp/snippets/src/test/java/dlp/snippets/TriggersTests.java diff --git a/dlp/snippets/install-without-bom/src/test/resources/dates.csv b/dlp/snippets/src/test/resources/dates.csv similarity index 100% rename from dlp/snippets/install-without-bom/src/test/resources/dates.csv rename to dlp/snippets/src/test/resources/dates.csv diff --git a/dlp/snippets/install-without-bom/src/test/resources/results.correct.csv b/dlp/snippets/src/test/resources/results.correct.csv similarity index 100% rename from dlp/snippets/install-without-bom/src/test/resources/results.correct.csv rename to dlp/snippets/src/test/resources/results.correct.csv diff --git a/dlp/snippets/install-without-bom/src/test/resources/sensitive-data-image.jpg b/dlp/snippets/src/test/resources/sensitive-data-image.jpg similarity index 100% rename from dlp/snippets/install-without-bom/src/test/resources/sensitive-data-image.jpg rename to dlp/snippets/src/test/resources/sensitive-data-image.jpg diff --git a/dlp/snippets/install-without-bom/src/test/resources/test.png b/dlp/snippets/src/test/resources/test.png similarity index 100% rename from dlp/snippets/install-without-bom/src/test/resources/test.png rename to dlp/snippets/src/test/resources/test.png diff --git a/dlp/snippets/install-without-bom/src/test/resources/test.txt b/dlp/snippets/src/test/resources/test.txt similarity index 100% rename from dlp/snippets/install-without-bom/src/test/resources/test.txt rename to dlp/snippets/src/test/resources/test.txt From 3ea680b9745311a35afb993ab495b7a6936eb0c9 Mon Sep 17 00:00:00 2001 From: Sita Lakshmi Sangameswaran Date: Fri, 17 Feb 2023 02:06:36 +0530 Subject: [PATCH 406/406] snippet bot error fix --- dlp/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlp/snippets/pom.xml b/dlp/snippets/pom.xml index 6cfe7f03966..c635bdf2bfb 100644 --- a/dlp/snippets/pom.xml +++ b/dlp/snippets/pom.xml @@ -23,7 +23,7 @@ UTF-8
- + com.google.cloud