@google-cloud/dlp 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/PACKAGE NAME?activeTab=versions
6
6
 
7
+ ## [6.2.0](https://github.com/googleapis/google-cloud-node/compare/dlp-v6.1.0...dlp-v6.2.0) (2025-06-03)
8
+
9
+
10
+ ### Features
11
+
12
+ * [dlp] add Dataplex Catalog action for discovery configs ([#6381](https://github.com/googleapis/google-cloud-node/issues/6381)) ([0a4221e](https://github.com/googleapis/google-cloud-node/commit/0a4221eb6787f427f82b835b6bd27c7fd5363b41))
13
+ * Add a project ID to table reference so that org parents can create single table discovery configs. ([0a4221e](https://github.com/googleapis/google-cloud-node/commit/0a4221eb6787f427f82b835b6bd27c7fd5363b41))
14
+ * New fields for data profile finding. ([0a4221e](https://github.com/googleapis/google-cloud-node/commit/0a4221eb6787f427f82b835b6bd27c7fd5363b41))
15
+
7
16
  ## [6.1.0](https://github.com/googleapis/google-cloud-node/compare/dlp-v6.0.1...dlp-v6.1.0) (2025-03-21)
8
17
 
9
18
 
package/README.md CHANGED
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the Cloud Data Loss Prevention API][enable_api].
47
- 1. [Set up authentication with a service account][auth] so you can access the
47
+ 1. [Set up authentication][auth] so you can access the
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -250,4 +250,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
250
250
  [projects]: https://console.cloud.google.com/project
251
251
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
252
252
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com
253
- [auth]: https://cloud.google.com/docs/authentication/getting-started
253
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -4199,32 +4199,78 @@ message Action {
4199
4199
  // Compatible with: Inspect
4200
4200
  message PublishFindingsToCloudDataCatalog {}
4201
4201
 
4202
- // Create a de-identified copy of the requested table or files.
4202
+ // Create a de-identified copy of a storage bucket. Only compatible
4203
+ // with Cloud Storage buckets.
4204
+ //
4203
4205
  //
4204
4206
  // A TransformationDetail will be created for each transformation.
4205
4207
  //
4206
- // If any rows in BigQuery are skipped during de-identification
4207
- // (transformation errors or row size exceeds BigQuery insert API limits) they
4208
- // are placed in the failure output table. If the original row exceeds
4209
- // the BigQuery insert API limit it will be truncated when written to the
4210
- // failure output table. The failure output table can be set in the
4211
- // action.deidentify.output.big_query_output.deidentified_failure_output_table
4212
- // field, if no table is set, a table will be automatically created in the
4213
- // same project and dataset as the original table.
4214
4208
  //
4215
- // Compatible with: Inspect
4209
+ // Compatible with: Inspection of Cloud Storage
4216
4210
  message Deidentify {
4217
4211
  // User specified deidentify templates and configs for structured,
4218
4212
  // unstructured, and image files.
4219
4213
  TransformationConfig transformation_config = 7;
4220
4214
 
4221
- // Config for storing transformation details. This is separate from the
4222
- // de-identified content, and contains metadata about the successful
4223
- // transformations and/or failures that occurred while de-identifying. This
4224
- // needs to be set in order for users to access information about the status
4225
- // of each transformation (see
4215
+ // Config for storing transformation details.
4216
+ //
4217
+ // This field specifies the configuration for storing detailed metadata
4218
+ // about each transformation performed during a de-identification process.
4219
+ // The metadata is stored separately from the de-identified content itself
4220
+ // and provides a granular record of both successful transformations and any
4221
+ // failures that occurred.
4222
+ //
4223
+ // Enabling this configuration is essential for users who need to access
4224
+ // comprehensive information about the status, outcome, and specifics of
4225
+ // each transformation. The details are captured in the
4226
4226
  // [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
4227
- // message for more information about what is noted).
4227
+ // message for each operation.
4228
+ //
4229
+ // Key use cases:
4230
+ //
4231
+ // * **Auditing and compliance**
4232
+ // * Provides a verifiable audit trail of de-identification activities,
4233
+ // which is crucial for meeting regulatory requirements and internal
4234
+ // data governance policies.
4235
+ // * Logs what data was transformed, what transformations were applied,
4236
+ // when they occurred, and their success status. This helps
4237
+ // demonstrate accountability and due diligence in protecting
4238
+ // sensitive data.
4239
+ //
4240
+ // * **Troubleshooting and debugging**
4241
+ // * Offers detailed error messages and context if a transformation
4242
+ // fails. This information is useful for diagnosing and resolving
4243
+ // issues in the de-identification pipeline.
4244
+ // * Helps pinpoint the exact location and nature of failures, speeding
4245
+ // up the debugging process.
4246
+ //
4247
+ // * **Process verification and quality assurance**
4248
+ // * Allows users to confirm that de-identification rules and
4249
+ // transformations were applied correctly and consistently across
4250
+ // the dataset as intended.
4251
+ // * Helps in verifying the effectiveness of the chosen
4252
+ // de-identification strategies.
4253
+ //
4254
+ // * **Data lineage and impact analysis**
4255
+ // * Creates a record of how data elements were modified, contributing
4256
+ // to data lineage. This is useful for understanding the provenance
4257
+ // of de-identified data.
4258
+ // * Aids in assessing the potential impact of de-identification choices
4259
+ // on downstream analytical processes or data usability.
4260
+ //
4261
+ // * **Reporting and operational insights**
4262
+ // * You can analyze the metadata stored in a queryable BigQuery table
4263
+ // to generate reports on transformation success rates, common
4264
+ // error types, processing volumes (e.g., transformedBytes), and the
4265
+ // types of transformations applied.
4266
+ // * These insights can inform optimization of de-identification
4267
+ // configurations and resource planning.
4268
+ //
4269
+ // To take advantage of these benefits, set this configuration. The stored
4270
+ // details include a description of the transformation, success or
4271
+ // error codes, error messages, the number of bytes transformed, the
4272
+ // location of the transformed content, and identifiers for the job and
4273
+ // source data.
4228
4274
  TransformationDetailsStorageConfig transformation_details_storage_config =
4229
4275
  3;
4230
4276
 
@@ -4958,6 +5004,18 @@ message DataProfileAction {
4958
5004
  // Center for each profile.
4959
5005
  message PublishToSecurityCommandCenter {}
4960
5006
 
5007
+ // Create Dataplex Catalog aspects for profiled resources with the aspect type
5008
+ // Sensitive Data Protection Profile. To learn more about aspects, see
5009
+ // https://cloud.google.com/sensitive-data-protection/docs/add-aspects.
5010
+ message PublishToDataplexCatalog {
5011
+ // Whether creating a Dataplex Catalog aspect for a profiled resource should
5012
+ // lower the risk of the profile for that resource. This also lowers the
5013
+ // data risk of resources at the lower levels of the resource hierarchy. For
5014
+ // example, reducing the data risk of a table data profile also reduces the
5015
+ // data risk of the constituent column data profiles.
5016
+ bool lower_data_risk_to_low = 1;
5017
+ }
5018
+
4961
5019
  // If set, attaches the [tags]
4962
5020
  // (https://cloud.google.com/resource-manager/docs/tags/tags-overview)
4963
5021
  // provided to profiled resources. Tags support [access
@@ -5031,6 +5089,10 @@ message DataProfileAction {
5031
5089
 
5032
5090
  // Tags the profiled resources with the specified tag values.
5033
5091
  TagResources tag_resources = 8;
5092
+
5093
+ // Publishes a portion of each profile to Dataplex Catalog with the aspect
5094
+ // type Sensitive Data Protection Profile.
5095
+ PublishToDataplexCatalog publish_to_dataplex_catalog = 9;
5034
5096
  }
5035
5097
  }
5036
5098
 
@@ -5065,6 +5127,14 @@ message DataProfileFinding {
5065
5127
 
5066
5128
  // How broadly a resource has been shared.
5067
5129
  ResourceVisibility resource_visibility = 8;
5130
+
5131
+ // The [full resource
5132
+ // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
5133
+ // of the resource profiled for this finding.
5134
+ string full_resource_name = 9;
5135
+
5136
+ // The type of the resource that was profiled.
5137
+ DataSourceType data_source_type = 10;
5068
5138
  }
5069
5139
 
5070
5140
  // Location of a data profile finding within a resource.
@@ -7989,7 +8059,8 @@ message FileStoreDataProfile {
7989
8059
  // The BigQuery table to which the sample findings are written.
7990
8060
  BigQueryTable sample_findings_table = 22;
7991
8061
 
7992
- // The file store does not have any files.
8062
+ // The file store does not have any files. If the profiling operation failed,
8063
+ // this is false.
7993
8064
  bool file_store_is_empty = 23;
7994
8065
 
7995
8066
  // The tags attached to the resource, including any tags attached during
@@ -869,6 +869,11 @@ message TableReference {
869
869
 
870
870
  // Name of the table.
871
871
  string table_id = 2;
872
+
873
+ // The Google Cloud project ID of the project containing the table.
874
+ // If omitted, the project ID is inferred from the parent project. This field
875
+ // is required if the parent resource is an organization.
876
+ string project_id = 3;
872
877
  }
873
878
 
874
879
  // Message defining a field of a BigQuery table.
@@ -20134,6 +20134,9 @@ export namespace google {
20134
20134
 
20135
20135
  /** DataProfileAction tagResources */
20136
20136
  tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null);
20137
+
20138
+ /** DataProfileAction publishToDataplexCatalog */
20139
+ publishToDataplexCatalog?: (google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null);
20137
20140
  }
20138
20141
 
20139
20142
  /** Represents a DataProfileAction. */
@@ -20160,8 +20163,11 @@ export namespace google {
20160
20163
  /** DataProfileAction tagResources. */
20161
20164
  public tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null);
20162
20165
 
20166
+ /** DataProfileAction publishToDataplexCatalog. */
20167
+ public publishToDataplexCatalog?: (google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null);
20168
+
20163
20169
  /** DataProfileAction action. */
20164
- public action?: ("exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources");
20170
+ public action?: ("exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|"publishToDataplexCatalog");
20165
20171
 
20166
20172
  /**
20167
20173
  * Creates a new DataProfileAction instance using the specified properties.
@@ -20663,6 +20669,103 @@ export namespace google {
20663
20669
  public static getTypeUrl(typeUrlPrefix?: string): string;
20664
20670
  }
20665
20671
 
20672
+ /** Properties of a PublishToDataplexCatalog. */
20673
+ interface IPublishToDataplexCatalog {
20674
+
20675
+ /** PublishToDataplexCatalog lowerDataRiskToLow */
20676
+ lowerDataRiskToLow?: (boolean|null);
20677
+ }
20678
+
20679
+ /** Represents a PublishToDataplexCatalog. */
20680
+ class PublishToDataplexCatalog implements IPublishToDataplexCatalog {
20681
+
20682
+ /**
20683
+ * Constructs a new PublishToDataplexCatalog.
20684
+ * @param [properties] Properties to set
20685
+ */
20686
+ constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog);
20687
+
20688
+ /** PublishToDataplexCatalog lowerDataRiskToLow. */
20689
+ public lowerDataRiskToLow: boolean;
20690
+
20691
+ /**
20692
+ * Creates a new PublishToDataplexCatalog instance using the specified properties.
20693
+ * @param [properties] Properties to set
20694
+ * @returns PublishToDataplexCatalog instance
20695
+ */
20696
+ public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog;
20697
+
20698
+ /**
20699
+ * Encodes the specified PublishToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages.
20700
+ * @param message PublishToDataplexCatalog message or plain object to encode
20701
+ * @param [writer] Writer to encode to
20702
+ * @returns Writer
20703
+ */
20704
+ public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer;
20705
+
20706
+ /**
20707
+ * Encodes the specified PublishToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages.
20708
+ * @param message PublishToDataplexCatalog message or plain object to encode
20709
+ * @param [writer] Writer to encode to
20710
+ * @returns Writer
20711
+ */
20712
+ public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer;
20713
+
20714
+ /**
20715
+ * Decodes a PublishToDataplexCatalog message from the specified reader or buffer.
20716
+ * @param reader Reader or buffer to decode from
20717
+ * @param [length] Message length if known beforehand
20718
+ * @returns PublishToDataplexCatalog
20719
+ * @throws {Error} If the payload is not a reader or valid buffer
20720
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20721
+ */
20722
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog;
20723
+
20724
+ /**
20725
+ * Decodes a PublishToDataplexCatalog message from the specified reader or buffer, length delimited.
20726
+ * @param reader Reader or buffer to decode from
20727
+ * @returns PublishToDataplexCatalog
20728
+ * @throws {Error} If the payload is not a reader or valid buffer
20729
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20730
+ */
20731
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog;
20732
+
20733
+ /**
20734
+ * Verifies a PublishToDataplexCatalog message.
20735
+ * @param message Plain object to verify
20736
+ * @returns `null` if valid, otherwise the reason why it is not
20737
+ */
20738
+ public static verify(message: { [k: string]: any }): (string|null);
20739
+
20740
+ /**
20741
+ * Creates a PublishToDataplexCatalog message from a plain object. Also converts values to their respective internal types.
20742
+ * @param object Plain object
20743
+ * @returns PublishToDataplexCatalog
20744
+ */
20745
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog;
20746
+
20747
+ /**
20748
+ * Creates a plain object from a PublishToDataplexCatalog message. Also converts values to other types if specified.
20749
+ * @param message PublishToDataplexCatalog
20750
+ * @param [options] Conversion options
20751
+ * @returns Plain object
20752
+ */
20753
+ public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog, options?: $protobuf.IConversionOptions): { [k: string]: any };
20754
+
20755
+ /**
20756
+ * Converts this PublishToDataplexCatalog to JSON.
20757
+ * @returns JSON object
20758
+ */
20759
+ public toJSON(): { [k: string]: any };
20760
+
20761
+ /**
20762
+ * Gets the default type url for PublishToDataplexCatalog
20763
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
20764
+ * @returns The default type url
20765
+ */
20766
+ public static getTypeUrl(typeUrlPrefix?: string): string;
20767
+ }
20768
+
20666
20769
  /** Properties of a TagResources. */
20667
20770
  interface ITagResources {
20668
20771
 
@@ -21008,6 +21111,12 @@ export namespace google {
21008
21111
 
21009
21112
  /** DataProfileFinding resourceVisibility */
21010
21113
  resourceVisibility?: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility|null);
21114
+
21115
+ /** DataProfileFinding fullResourceName */
21116
+ fullResourceName?: (string|null);
21117
+
21118
+ /** DataProfileFinding dataSourceType */
21119
+ dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null);
21011
21120
  }
21012
21121
 
21013
21122
  /** Represents a DataProfileFinding. */
@@ -21043,6 +21152,12 @@ export namespace google {
21043
21152
  /** DataProfileFinding resourceVisibility. */
21044
21153
  public resourceVisibility: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility);
21045
21154
 
21155
+ /** DataProfileFinding fullResourceName. */
21156
+ public fullResourceName: string;
21157
+
21158
+ /** DataProfileFinding dataSourceType. */
21159
+ public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null);
21160
+
21046
21161
  /**
21047
21162
  * Creates a new DataProfileFinding instance using the specified properties.
21048
21163
  * @param [properties] Properties to set
@@ -40905,6 +41020,9 @@ export namespace google {
40905
41020
 
40906
41021
  /** TableReference tableId */
40907
41022
  tableId?: (string|null);
41023
+
41024
+ /** TableReference projectId */
41025
+ projectId?: (string|null);
40908
41026
  }
40909
41027
 
40910
41028
  /** Represents a TableReference. */
@@ -40922,6 +41040,9 @@ export namespace google {
40922
41040
  /** TableReference tableId. */
40923
41041
  public tableId: string;
40924
41042
 
41043
+ /** TableReference projectId. */
41044
+ public projectId: string;
41045
+
40925
41046
  /**
40926
41047
  * Creates a new TableReference instance using the specified properties.
40927
41048
  * @param [properties] Properties to set
@@ -50054,6 +50054,7 @@
50054
50054
  * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null} [publishToChronicle] DataProfileAction publishToChronicle
50055
50055
  * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null} [publishToScc] DataProfileAction publishToScc
50056
50056
  * @property {google.privacy.dlp.v2.DataProfileAction.ITagResources|null} [tagResources] DataProfileAction tagResources
50057
+ * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null} [publishToDataplexCatalog] DataProfileAction publishToDataplexCatalog
50057
50058
  */
50058
50059
 
50059
50060
  /**
@@ -50111,17 +50112,25 @@
50111
50112
  */
50112
50113
  DataProfileAction.prototype.tagResources = null;
50113
50114
 
50115
+ /**
50116
+ * DataProfileAction publishToDataplexCatalog.
50117
+ * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null|undefined} publishToDataplexCatalog
50118
+ * @memberof google.privacy.dlp.v2.DataProfileAction
50119
+ * @instance
50120
+ */
50121
+ DataProfileAction.prototype.publishToDataplexCatalog = null;
50122
+
50114
50123
  // OneOf field names bound to virtual getters and setters
50115
50124
  var $oneOfFields;
50116
50125
 
50117
50126
  /**
50118
50127
  * DataProfileAction action.
50119
- * @member {"exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|undefined} action
50128
+ * @member {"exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|"publishToDataplexCatalog"|undefined} action
50120
50129
  * @memberof google.privacy.dlp.v2.DataProfileAction
50121
50130
  * @instance
50122
50131
  */
50123
50132
  Object.defineProperty(DataProfileAction.prototype, "action", {
50124
- get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "publishToChronicle", "publishToScc", "tagResources"]),
50133
+ get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "publishToChronicle", "publishToScc", "tagResources", "publishToDataplexCatalog"]),
50125
50134
  set: $util.oneOfSetter($oneOfFields)
50126
50135
  });
50127
50136
 
@@ -50159,6 +50168,8 @@
50159
50168
  $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.encode(message.publishToScc, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
50160
50169
  if (message.tagResources != null && Object.hasOwnProperty.call(message, "tagResources"))
50161
50170
  $root.google.privacy.dlp.v2.DataProfileAction.TagResources.encode(message.tagResources, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
50171
+ if (message.publishToDataplexCatalog != null && Object.hasOwnProperty.call(message, "publishToDataplexCatalog"))
50172
+ $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.encode(message.publishToDataplexCatalog, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
50162
50173
  return writer;
50163
50174
  };
50164
50175
 
@@ -50213,6 +50224,10 @@
50213
50224
  message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.decode(reader, reader.uint32());
50214
50225
  break;
50215
50226
  }
50227
+ case 9: {
50228
+ message.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.decode(reader, reader.uint32());
50229
+ break;
50230
+ }
50216
50231
  default:
50217
50232
  reader.skipType(tag & 7);
50218
50233
  break;
@@ -50297,6 +50312,16 @@
50297
50312
  return "tagResources." + error;
50298
50313
  }
50299
50314
  }
50315
+ if (message.publishToDataplexCatalog != null && message.hasOwnProperty("publishToDataplexCatalog")) {
50316
+ if (properties.action === 1)
50317
+ return "action: multiple values";
50318
+ properties.action = 1;
50319
+ {
50320
+ var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify(message.publishToDataplexCatalog);
50321
+ if (error)
50322
+ return "publishToDataplexCatalog." + error;
50323
+ }
50324
+ }
50300
50325
  return null;
50301
50326
  };
50302
50327
 
@@ -50337,6 +50362,11 @@
50337
50362
  throw TypeError(".google.privacy.dlp.v2.DataProfileAction.tagResources: object expected");
50338
50363
  message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.fromObject(object.tagResources);
50339
50364
  }
50365
+ if (object.publishToDataplexCatalog != null) {
50366
+ if (typeof object.publishToDataplexCatalog !== "object")
50367
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToDataplexCatalog: object expected");
50368
+ message.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.fromObject(object.publishToDataplexCatalog);
50369
+ }
50340
50370
  return message;
50341
50371
  };
50342
50372
 
@@ -50378,6 +50408,11 @@
50378
50408
  if (options.oneofs)
50379
50409
  object.action = "tagResources";
50380
50410
  }
50411
+ if (message.publishToDataplexCatalog != null && message.hasOwnProperty("publishToDataplexCatalog")) {
50412
+ object.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.toObject(message.publishToDataplexCatalog, options);
50413
+ if (options.oneofs)
50414
+ object.action = "publishToDataplexCatalog";
50415
+ }
50381
50416
  return object;
50382
50417
  };
50383
50418
 
@@ -51373,6 +51408,209 @@
51373
51408
  return PublishToSecurityCommandCenter;
51374
51409
  })();
51375
51410
 
51411
+ DataProfileAction.PublishToDataplexCatalog = (function() {
51412
+
51413
+ /**
51414
+ * Properties of a PublishToDataplexCatalog.
51415
+ * @memberof google.privacy.dlp.v2.DataProfileAction
51416
+ * @interface IPublishToDataplexCatalog
51417
+ * @property {boolean|null} [lowerDataRiskToLow] PublishToDataplexCatalog lowerDataRiskToLow
51418
+ */
51419
+
51420
+ /**
51421
+ * Constructs a new PublishToDataplexCatalog.
51422
+ * @memberof google.privacy.dlp.v2.DataProfileAction
51423
+ * @classdesc Represents a PublishToDataplexCatalog.
51424
+ * @implements IPublishToDataplexCatalog
51425
+ * @constructor
51426
+ * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog=} [properties] Properties to set
51427
+ */
51428
+ function PublishToDataplexCatalog(properties) {
51429
+ if (properties)
51430
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
51431
+ if (properties[keys[i]] != null)
51432
+ this[keys[i]] = properties[keys[i]];
51433
+ }
51434
+
51435
+ /**
51436
+ * PublishToDataplexCatalog lowerDataRiskToLow.
51437
+ * @member {boolean} lowerDataRiskToLow
51438
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51439
+ * @instance
51440
+ */
51441
+ PublishToDataplexCatalog.prototype.lowerDataRiskToLow = false;
51442
+
51443
+ /**
51444
+ * Creates a new PublishToDataplexCatalog instance using the specified properties.
51445
+ * @function create
51446
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51447
+ * @static
51448
+ * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog=} [properties] Properties to set
51449
+ * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog instance
51450
+ */
51451
+ PublishToDataplexCatalog.create = function create(properties) {
51452
+ return new PublishToDataplexCatalog(properties);
51453
+ };
51454
+
51455
+ /**
51456
+ * Encodes the specified PublishToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages.
51457
+ * @function encode
51458
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51459
+ * @static
51460
+ * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog} message PublishToDataplexCatalog message or plain object to encode
51461
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51462
+ * @returns {$protobuf.Writer} Writer
51463
+ */
51464
+ PublishToDataplexCatalog.encode = function encode(message, writer) {
51465
+ if (!writer)
51466
+ writer = $Writer.create();
51467
+ if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow"))
51468
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.lowerDataRiskToLow);
51469
+ return writer;
51470
+ };
51471
+
51472
+ /**
51473
+ * Encodes the specified PublishToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages.
51474
+ * @function encodeDelimited
51475
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51476
+ * @static
51477
+ * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog} message PublishToDataplexCatalog message or plain object to encode
51478
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51479
+ * @returns {$protobuf.Writer} Writer
51480
+ */
51481
+ PublishToDataplexCatalog.encodeDelimited = function encodeDelimited(message, writer) {
51482
+ return this.encode(message, writer).ldelim();
51483
+ };
51484
+
51485
+ /**
51486
+ * Decodes a PublishToDataplexCatalog message from the specified reader or buffer.
51487
+ * @function decode
51488
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51489
+ * @static
51490
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51491
+ * @param {number} [length] Message length if known beforehand
51492
+ * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog
51493
+ * @throws {Error} If the payload is not a reader or valid buffer
51494
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51495
+ */
51496
+ PublishToDataplexCatalog.decode = function decode(reader, length) {
51497
+ if (!(reader instanceof $Reader))
51498
+ reader = $Reader.create(reader);
51499
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog();
51500
+ while (reader.pos < end) {
51501
+ var tag = reader.uint32();
51502
+ switch (tag >>> 3) {
51503
+ case 1: {
51504
+ message.lowerDataRiskToLow = reader.bool();
51505
+ break;
51506
+ }
51507
+ default:
51508
+ reader.skipType(tag & 7);
51509
+ break;
51510
+ }
51511
+ }
51512
+ return message;
51513
+ };
51514
+
51515
+ /**
51516
+ * Decodes a PublishToDataplexCatalog message from the specified reader or buffer, length delimited.
51517
+ * @function decodeDelimited
51518
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51519
+ * @static
51520
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51521
+ * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog
51522
+ * @throws {Error} If the payload is not a reader or valid buffer
51523
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51524
+ */
51525
+ PublishToDataplexCatalog.decodeDelimited = function decodeDelimited(reader) {
51526
+ if (!(reader instanceof $Reader))
51527
+ reader = new $Reader(reader);
51528
+ return this.decode(reader, reader.uint32());
51529
+ };
51530
+
51531
+ /**
51532
+ * Verifies a PublishToDataplexCatalog message.
51533
+ * @function verify
51534
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51535
+ * @static
51536
+ * @param {Object.<string,*>} message Plain object to verify
51537
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
51538
+ */
51539
+ PublishToDataplexCatalog.verify = function verify(message) {
51540
+ if (typeof message !== "object" || message === null)
51541
+ return "object expected";
51542
+ if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow"))
51543
+ if (typeof message.lowerDataRiskToLow !== "boolean")
51544
+ return "lowerDataRiskToLow: boolean expected";
51545
+ return null;
51546
+ };
51547
+
51548
+ /**
51549
+ * Creates a PublishToDataplexCatalog message from a plain object. Also converts values to their respective internal types.
51550
+ * @function fromObject
51551
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51552
+ * @static
51553
+ * @param {Object.<string,*>} object Plain object
51554
+ * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog
51555
+ */
51556
+ PublishToDataplexCatalog.fromObject = function fromObject(object) {
51557
+ if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog)
51558
+ return object;
51559
+ var message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog();
51560
+ if (object.lowerDataRiskToLow != null)
51561
+ message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow);
51562
+ return message;
51563
+ };
51564
+
51565
+ /**
51566
+ * Creates a plain object from a PublishToDataplexCatalog message. Also converts values to other types if specified.
51567
+ * @function toObject
51568
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51569
+ * @static
51570
+ * @param {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} message PublishToDataplexCatalog
51571
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
51572
+ * @returns {Object.<string,*>} Plain object
51573
+ */
51574
+ PublishToDataplexCatalog.toObject = function toObject(message, options) {
51575
+ if (!options)
51576
+ options = {};
51577
+ var object = {};
51578
+ if (options.defaults)
51579
+ object.lowerDataRiskToLow = false;
51580
+ if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow"))
51581
+ object.lowerDataRiskToLow = message.lowerDataRiskToLow;
51582
+ return object;
51583
+ };
51584
+
51585
+ /**
51586
+ * Converts this PublishToDataplexCatalog to JSON.
51587
+ * @function toJSON
51588
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51589
+ * @instance
51590
+ * @returns {Object.<string,*>} JSON object
51591
+ */
51592
+ PublishToDataplexCatalog.prototype.toJSON = function toJSON() {
51593
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
51594
+ };
51595
+
51596
+ /**
51597
+ * Gets the default type url for PublishToDataplexCatalog
51598
+ * @function getTypeUrl
51599
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog
51600
+ * @static
51601
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
51602
+ * @returns {string} The default type url
51603
+ */
51604
+ PublishToDataplexCatalog.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
51605
+ if (typeUrlPrefix === undefined) {
51606
+ typeUrlPrefix = "type.googleapis.com";
51607
+ }
51608
+ return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog";
51609
+ };
51610
+
51611
+ return PublishToDataplexCatalog;
51612
+ })();
51613
+
51376
51614
  DataProfileAction.TagResources = (function() {
51377
51615
 
51378
51616
  /**
@@ -52187,6 +52425,8 @@
52187
52425
  * @property {google.protobuf.ITimestamp|null} [timestamp] DataProfileFinding timestamp
52188
52426
  * @property {google.privacy.dlp.v2.IDataProfileFindingLocation|null} [location] DataProfileFinding location
52189
52427
  * @property {google.privacy.dlp.v2.ResourceVisibility|null} [resourceVisibility] DataProfileFinding resourceVisibility
52428
+ * @property {string|null} [fullResourceName] DataProfileFinding fullResourceName
52429
+ * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] DataProfileFinding dataSourceType
52190
52430
  */
52191
52431
 
52192
52432
  /**
@@ -52268,6 +52508,22 @@
52268
52508
  */
52269
52509
  DataProfileFinding.prototype.resourceVisibility = 0;
52270
52510
 
52511
+ /**
52512
+ * DataProfileFinding fullResourceName.
52513
+ * @member {string} fullResourceName
52514
+ * @memberof google.privacy.dlp.v2.DataProfileFinding
52515
+ * @instance
52516
+ */
52517
+ DataProfileFinding.prototype.fullResourceName = "";
52518
+
52519
+ /**
52520
+ * DataProfileFinding dataSourceType.
52521
+ * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType
52522
+ * @memberof google.privacy.dlp.v2.DataProfileFinding
52523
+ * @instance
52524
+ */
52525
+ DataProfileFinding.prototype.dataSourceType = null;
52526
+
52271
52527
  /**
52272
52528
  * Creates a new DataProfileFinding instance using the specified properties.
52273
52529
  * @function create
@@ -52308,6 +52564,10 @@
52308
52564
  $root.google.privacy.dlp.v2.DataProfileFindingLocation.encode(message.location, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
52309
52565
  if (message.resourceVisibility != null && Object.hasOwnProperty.call(message, "resourceVisibility"))
52310
52566
  writer.uint32(/* id 8, wireType 0 =*/64).int32(message.resourceVisibility);
52567
+ if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName"))
52568
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.fullResourceName);
52569
+ if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType"))
52570
+ $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
52311
52571
  return writer;
52312
52572
  };
52313
52573
 
@@ -52374,6 +52634,14 @@
52374
52634
  message.resourceVisibility = reader.int32();
52375
52635
  break;
52376
52636
  }
52637
+ case 9: {
52638
+ message.fullResourceName = reader.string();
52639
+ break;
52640
+ }
52641
+ case 10: {
52642
+ message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32());
52643
+ break;
52644
+ }
52377
52645
  default:
52378
52646
  reader.skipType(tag & 7);
52379
52647
  break;
@@ -52448,6 +52716,14 @@
52448
52716
  case 20:
52449
52717
  break;
52450
52718
  }
52719
+ if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName"))
52720
+ if (!$util.isString(message.fullResourceName))
52721
+ return "fullResourceName: string expected";
52722
+ if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) {
52723
+ var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType);
52724
+ if (error)
52725
+ return "dataSourceType." + error;
52726
+ }
52451
52727
  return null;
52452
52728
  };
52453
52729
 
@@ -52513,6 +52789,13 @@
52513
52789
  message.resourceVisibility = 20;
52514
52790
  break;
52515
52791
  }
52792
+ if (object.fullResourceName != null)
52793
+ message.fullResourceName = String(object.fullResourceName);
52794
+ if (object.dataSourceType != null) {
52795
+ if (typeof object.dataSourceType !== "object")
52796
+ throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.dataSourceType: object expected");
52797
+ message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType);
52798
+ }
52516
52799
  return message;
52517
52800
  };
52518
52801
 
@@ -52538,6 +52821,8 @@
52538
52821
  object.timestamp = null;
52539
52822
  object.location = null;
52540
52823
  object.resourceVisibility = options.enums === String ? "RESOURCE_VISIBILITY_UNSPECIFIED" : 0;
52824
+ object.fullResourceName = "";
52825
+ object.dataSourceType = null;
52541
52826
  }
52542
52827
  if (message.quote != null && message.hasOwnProperty("quote"))
52543
52828
  object.quote = message.quote;
@@ -52555,6 +52840,10 @@
52555
52840
  object.location = $root.google.privacy.dlp.v2.DataProfileFindingLocation.toObject(message.location, options);
52556
52841
  if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility"))
52557
52842
  object.resourceVisibility = options.enums === String ? $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] === undefined ? message.resourceVisibility : $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] : message.resourceVisibility;
52843
+ if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName"))
52844
+ object.fullResourceName = message.fullResourceName;
52845
+ if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType"))
52846
+ object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options);
52558
52847
  return object;
52559
52848
  };
52560
52849
 
@@ -102389,6 +102678,7 @@
102389
102678
  * @interface ITableReference
102390
102679
  * @property {string|null} [datasetId] TableReference datasetId
102391
102680
  * @property {string|null} [tableId] TableReference tableId
102681
+ * @property {string|null} [projectId] TableReference projectId
102392
102682
  */
102393
102683
 
102394
102684
  /**
@@ -102422,6 +102712,14 @@
102422
102712
  */
102423
102713
  TableReference.prototype.tableId = "";
102424
102714
 
102715
+ /**
102716
+ * TableReference projectId.
102717
+ * @member {string} projectId
102718
+ * @memberof google.privacy.dlp.v2.TableReference
102719
+ * @instance
102720
+ */
102721
+ TableReference.prototype.projectId = "";
102722
+
102425
102723
  /**
102426
102724
  * Creates a new TableReference instance using the specified properties.
102427
102725
  * @function create
@@ -102450,6 +102748,8 @@
102450
102748
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId);
102451
102749
  if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId"))
102452
102750
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId);
102751
+ if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
102752
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectId);
102453
102753
  return writer;
102454
102754
  };
102455
102755
 
@@ -102492,6 +102792,10 @@
102492
102792
  message.tableId = reader.string();
102493
102793
  break;
102494
102794
  }
102795
+ case 3: {
102796
+ message.projectId = reader.string();
102797
+ break;
102798
+ }
102495
102799
  default:
102496
102800
  reader.skipType(tag & 7);
102497
102801
  break;
@@ -102533,6 +102837,9 @@
102533
102837
  if (message.tableId != null && message.hasOwnProperty("tableId"))
102534
102838
  if (!$util.isString(message.tableId))
102535
102839
  return "tableId: string expected";
102840
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
102841
+ if (!$util.isString(message.projectId))
102842
+ return "projectId: string expected";
102536
102843
  return null;
102537
102844
  };
102538
102845
 
@@ -102552,6 +102859,8 @@
102552
102859
  message.datasetId = String(object.datasetId);
102553
102860
  if (object.tableId != null)
102554
102861
  message.tableId = String(object.tableId);
102862
+ if (object.projectId != null)
102863
+ message.projectId = String(object.projectId);
102555
102864
  return message;
102556
102865
  };
102557
102866
 
@@ -102571,11 +102880,14 @@
102571
102880
  if (options.defaults) {
102572
102881
  object.datasetId = "";
102573
102882
  object.tableId = "";
102883
+ object.projectId = "";
102574
102884
  }
102575
102885
  if (message.datasetId != null && message.hasOwnProperty("datasetId"))
102576
102886
  object.datasetId = message.datasetId;
102577
102887
  if (message.tableId != null && message.hasOwnProperty("tableId"))
102578
102888
  object.tableId = message.tableId;
102889
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
102890
+ object.projectId = message.projectId;
102579
102891
  return object;
102580
102892
  };
102581
102893
 
@@ -1,4 +1,7 @@
1
1
  {
2
+ "options": {
3
+ "syntax": "proto3"
4
+ },
2
5
  "nested": {
3
6
  "google": {
4
7
  "nested": {
@@ -4985,7 +4988,8 @@
4985
4988
  "pubSubNotification",
4986
4989
  "publishToChronicle",
4987
4990
  "publishToScc",
4988
- "tagResources"
4991
+ "tagResources",
4992
+ "publishToDataplexCatalog"
4989
4993
  ]
4990
4994
  }
4991
4995
  },
@@ -5009,6 +5013,10 @@
5009
5013
  "tagResources": {
5010
5014
  "type": "TagResources",
5011
5015
  "id": 8
5016
+ },
5017
+ "publishToDataplexCatalog": {
5018
+ "type": "PublishToDataplexCatalog",
5019
+ "id": 9
5012
5020
  }
5013
5021
  },
5014
5022
  "nested": {
@@ -5069,6 +5077,14 @@
5069
5077
  "PublishToSecurityCommandCenter": {
5070
5078
  "fields": {}
5071
5079
  },
5080
+ "PublishToDataplexCatalog": {
5081
+ "fields": {
5082
+ "lowerDataRiskToLow": {
5083
+ "type": "bool",
5084
+ "id": 1
5085
+ }
5086
+ }
5087
+ },
5072
5088
  "TagResources": {
5073
5089
  "fields": {
5074
5090
  "tagConditions": {
@@ -5158,6 +5174,14 @@
5158
5174
  "resourceVisibility": {
5159
5175
  "type": "ResourceVisibility",
5160
5176
  "id": 8
5177
+ },
5178
+ "fullResourceName": {
5179
+ "type": "string",
5180
+ "id": 9
5181
+ },
5182
+ "dataSourceType": {
5183
+ "type": "DataSourceType",
5184
+ "id": 10
5161
5185
  }
5162
5186
  }
5163
5187
  },
@@ -9083,6 +9107,10 @@
9083
9107
  "tableId": {
9084
9108
  "type": "string",
9085
9109
  "id": 2
9110
+ },
9111
+ "projectId": {
9112
+ "type": "string",
9113
+ "id": 3
9086
9114
  }
9087
9115
  }
9088
9116
  },
@@ -5517,7 +5517,9 @@ class DlpServiceClient {
5517
5517
  this._log.info('ending gRPC channel');
5518
5518
  this._terminated = true;
5519
5519
  stub.close();
5520
- this.locationsClient.close();
5520
+ this.locationsClient.close().catch(err => {
5521
+ throw err;
5522
+ });
5521
5523
  });
5522
5524
  }
5523
5525
  return Promise.resolve();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@google-cloud/dlp",
3
3
  "description": "DLP API client for Node.js",
4
- "version": "6.1.0",
4
+ "version": "6.2.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc",
7
7
  "engines": {