From e2486cdd3f93ed7c6310cf54c78a0afdd9bb37a6 Mon Sep 17 00:00:00 2001 From: DPE bot Date: Fri, 26 Oct 2018 04:37:27 -0700 Subject: [PATCH] feat: add excluded field field for storage (#169) feat: add excluded field field for storage --- .../protos/google/privacy/dlp/v2/dlp.proto | 11 +++++++---- .../protos/google/privacy/dlp/v2/storage.proto | 10 ++++++++-- .../src/v2/doc/google/privacy/dlp/v2/doc_dlp.js | 12 ++++++++---- .../src/v2/doc/google/privacy/dlp/v2/doc_storage.js | 12 ++++++++++-- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto index a23eef6147d..e2858d6f652 100644 --- a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto +++ b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/dlp.proto @@ -965,8 +965,9 @@ message OutputStorageConfig { // from the predefined schema that are missing will be added. No columns in // the existing table will be deleted. // - // If unspecified, then all available columns will be used for a new table, - // and no changes will be made to an existing table. + // If unspecified, then all available columns will be used for a new table or + // an (existing) table with no schema, and no changes will be made to an + // existing table that has a schema. OutputSchema output_schema = 3; } @@ -1138,7 +1139,7 @@ message PrivacyMetric { // Optional message indicating that multiple rows might be associated to a // single individual. If the same entity_id is associated to multiple - // quasi-identifier tuples over distict rows, we consider the entire + // quasi-identifier tuples over distinct rows, we consider the entire // collection of tuples as the composite quasi-identifier. This collection // is a multiset: the order in which the different tuples appear in the // dataset is ignored, but their frequency is taken into account. @@ -1556,11 +1557,13 @@ message Value { message QuoteInfo { // Object representation of the quote. oneof parsed_quote { + // The date time indicated by the quote. DateTime date_time = 2; } } // Message for a date time object. +// e.g. 2018-01-01, 5th August. message DateTime { message TimeZone { // Set only if the offset can be determined. Positive for time ahead of UTC. @@ -2284,7 +2287,7 @@ message JobTrigger { repeated Trigger triggers = 5; // A stream of errors encountered when the trigger was activated. Repeated - // errors may result in the JobTrigger automaticaly being paused. + // errors may result in the JobTrigger automatically being paused. // Will return the last 100 errors. Whenever the JobTrigger is modified // this list will be cleared. Output only field. repeated Error errors = 6; diff --git a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto index f17ca6f15f7..e7b540cbb86 100644 --- a/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto +++ b/packages/google-privacy-dlp/protos/google/privacy/dlp/v2/storage.proto @@ -33,7 +33,8 @@ message InfoType { // Name of the information type. Either a name of your choosing when // creating a CustomInfoType, or one of the names listed // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying - // a built-in type. + // a built-in type. InfoType names should conform to the pattern + // [a-zA-Z0-9_]{1,64}. string name = 1; } @@ -359,7 +360,8 @@ message CloudStorageOptions { // List of file type groups to include in the scan. // If empty, all files are scanned and available data format processors - // are applied. + // are applied. In addition, the binary content of the selected files + // is always scanned as well. repeated FileType file_types = 5; SampleMethod sample_method = 6; @@ -420,6 +422,10 @@ message BigQueryOptions { int32 rows_limit_percent = 6; SampleMethod sample_method = 4; + + // References to fields excluded from scanning. This allows you to skip + // inspection of entire columns which you know have no findings. + repeated FieldId excluded_fields = 5; } // Shared message indicating Cloud storage type. diff --git a/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_dlp.js b/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_dlp.js index 5d929aff584..cdd48a637b9 100644 --- a/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_dlp.js +++ b/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_dlp.js @@ -905,8 +905,9 @@ const InspectContentResponse = { * from the predefined schema that are missing will be added. No columns in * the existing table will be deleted. * - * If unspecified, then all available columns will be used for a new table, - * and no changes will be made to an existing table. + * If unspecified, then all available columns will be used for a new table or + * an (existing) table with no schema, and no changes will be made to an + * existing table that has a schema. * * The number should be among the values of [OutputSchema]{@link google.privacy.dlp.v2.OutputSchema} * @@ -1287,7 +1288,7 @@ const PrivacyMetric = { * @property {Object} entityId * Optional message indicating that multiple rows might be associated to a * single individual. If the same entity_id is associated to multiple - * quasi-identifier tuples over distict rows, we consider the entire + * quasi-identifier tuples over distinct rows, we consider the entire * collection of tuples as the composite quasi-identifier. This collection * is a multiset: the order in which the different tuples appear in the * dataset is ignored, but their frequency is taken into account. @@ -1954,6 +1955,8 @@ const Value = { * Message for infoType-dependent details parsed from quote. * * @property {Object} dateTime + * The date time indicated by the quote. + * * This object should have the same structure as [DateTime]{@link google.privacy.dlp.v2.DateTime} * * @typedef QuoteInfo @@ -1966,6 +1969,7 @@ const QuoteInfo = { /** * Message for a date time object. + * e.g. 2018-01-01, 5th August. * * @property {Object} date * One or more of the following must be set. All fields are optional, but @@ -3090,7 +3094,7 @@ const Error = { * * @property {Object[]} errors * A stream of errors encountered when the trigger was activated. Repeated - * errors may result in the JobTrigger automaticaly being paused. + * errors may result in the JobTrigger automatically being paused. * Will return the last 100 errors. Whenever the JobTrigger is modified * this list will be cleared. Output only field. * diff --git a/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_storage.js b/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_storage.js index ac6006999c4..2fccf6bb040 100644 --- a/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_storage.js +++ b/packages/google-privacy-dlp/src/v2/doc/google/privacy/dlp/v2/doc_storage.js @@ -22,7 +22,8 @@ * Name of the information type. Either a name of your choosing when * creating a CustomInfoType, or one of the names listed * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying - * a built-in type. + * a built-in type. InfoType names should conform to the pattern + * [a-zA-Z0-9_]{1,64}. * * @typedef InfoType * @memberof google.privacy.dlp.v2 @@ -486,7 +487,8 @@ const CloudStorageRegexFileSet = { * @property {number[]} fileTypes * List of file type groups to include in the scan. * If empty, all files are scanned and available data format processors - * are applied. + * are applied. In addition, the binary content of the selected files + * is always scanned as well. * * The number should be among the values of [FileType]{@link google.privacy.dlp.v2.FileType} * @@ -611,6 +613,12 @@ const CloudStoragePath = { * @property {number} sampleMethod * The number should be among the values of [SampleMethod]{@link google.privacy.dlp.v2.SampleMethod} * + * @property {Object[]} excludedFields + * References to fields excluded from scanning. This allows you to skip + * inspection of entire columns which you know have no findings. + * + * This object should have the same structure as [FieldId]{@link google.privacy.dlp.v2.FieldId} + * * @typedef BigQueryOptions * @memberof google.privacy.dlp.v2 * @see [google.privacy.dlp.v2.BigQueryOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2/storage.proto}