in src/main/java/com/google/cloud/solutions/autotokenize/pipeline/DlpInspectionPipeline.java [269:289]
private DlpBatchInspectFactory makeDlpBatchIdentifierFactory() {
var dlpIdentifierBuilder =
DlpBatchInspectFactory.builder()
.projectId(options.getProject())
.dlpRegion(options.getDlpRegion())
.dlpFactory(dlpClientFactory);
if (options.getObservableInfoTypes() != null && !options.getObservableInfoTypes().isEmpty()) {
ImmutableSet<InfoType> userProvidedInfoTypes =
options.getObservableInfoTypes().stream()
.map(InfoType.newBuilder()::setName)
.map(InfoType.Builder::build)
.collect(toImmutableSet());
dlpIdentifierBuilder.observableType(userProvidedInfoTypes);
dlpIdentifierBuilder.observableType(userProvidedInfoTypes);
}
return dlpIdentifierBuilder.build();
}