Skip to content

Commit

Permalink
samples: Auto-update dependencies. (#947)
Browse files Browse the repository at this point in the history
* Auto-update dependencies.
* Updated dlp-samples.
  • Loading branch information
dpebot authored and chingor13 committed Aug 4, 2020
1 parent d8a887a commit 63c365f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dlp/snippets/snippets/src/main/java/com/example/dlp/Redact.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 63c365f

Please sign in to comment.