Skip to content

Commit

Permalink
Clean up DLP region tags. (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and kurtisvg committed Mar 16, 2018
1 parent efb42ae commit fa23d46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dlp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- [START pom] -->
<!-- [START dlp_pom] -->
<project>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
Expand Down Expand Up @@ -83,4 +83,4 @@
</plugins>
</build>
</project>
<!-- [END pom] -->
<!-- [END dlp_pom] -->
4 changes: 2 additions & 2 deletions dlp/src/main/java/com/example/dlp/DeIdentification.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions dlp/src/main/java/com/example/dlp/Metadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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. */
Expand Down
8 changes: 4 additions & 4 deletions dlp/src/main/java/com/example/dlp/RiskAnalysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit fa23d46

Please sign in to comment.