Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up DLP region tags. #1051

Merged
merged 1 commit into from
Mar 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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