@google-cloud/dlp 5.0.1 → 5.1.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.
@@ -146,7 +146,9 @@ class DlpServiceClient {
146
146
  // identifiers to uniquely identify resources within the API.
147
147
  // Create useful helper objects for these.
148
148
  this.pathTemplates = {
149
+ discoveryConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}'),
149
150
  findingPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/findings/{finding}'),
151
+ locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
150
152
  organizationPathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}'),
151
153
  organizationDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/deidentifyTemplates/{deidentify_template}'),
152
154
  organizationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate('organizations/{organization}/inspectTemplates/{inspect_template}'),
@@ -174,6 +176,7 @@ class DlpServiceClient {
174
176
  listInspectTemplates: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'inspectTemplates'),
175
177
  listDeidentifyTemplates: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'deidentifyTemplates'),
176
178
  listJobTriggers: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobTriggers'),
179
+ listDiscoveryConfigs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'discoveryConfigs'),
177
180
  listDlpJobs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'jobs'),
178
181
  listStoredInfoTypes: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'storedInfoTypes'),
179
182
  };
@@ -233,6 +236,11 @@ class DlpServiceClient {
233
236
  'listJobTriggers',
234
237
  'deleteJobTrigger',
235
238
  'activateJobTrigger',
239
+ 'createDiscoveryConfig',
240
+ 'updateDiscoveryConfig',
241
+ 'getDiscoveryConfig',
242
+ 'listDiscoveryConfigs',
243
+ 'deleteDiscoveryConfig',
236
244
  'createDlpJob',
237
245
  'listDlpJobs',
238
246
  'getDlpJob',
@@ -702,6 +710,90 @@ class DlpServiceClient {
702
710
  this.initialize();
703
711
  return this.innerApiCalls.activateJobTrigger(request, options, callback);
704
712
  }
713
+ createDiscoveryConfig(request, optionsOrCallback, callback) {
714
+ var _a;
715
+ request = request || {};
716
+ let options;
717
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
718
+ callback = optionsOrCallback;
719
+ options = {};
720
+ }
721
+ else {
722
+ options = optionsOrCallback;
723
+ }
724
+ options = options || {};
725
+ options.otherArgs = options.otherArgs || {};
726
+ options.otherArgs.headers = options.otherArgs.headers || {};
727
+ options.otherArgs.headers['x-goog-request-params'] =
728
+ this._gaxModule.routingHeader.fromParams({
729
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
730
+ });
731
+ this.initialize();
732
+ return this.innerApiCalls.createDiscoveryConfig(request, options, callback);
733
+ }
734
+ updateDiscoveryConfig(request, optionsOrCallback, callback) {
735
+ var _a;
736
+ request = request || {};
737
+ let options;
738
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
739
+ callback = optionsOrCallback;
740
+ options = {};
741
+ }
742
+ else {
743
+ options = optionsOrCallback;
744
+ }
745
+ options = options || {};
746
+ options.otherArgs = options.otherArgs || {};
747
+ options.otherArgs.headers = options.otherArgs.headers || {};
748
+ options.otherArgs.headers['x-goog-request-params'] =
749
+ this._gaxModule.routingHeader.fromParams({
750
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
751
+ });
752
+ this.initialize();
753
+ return this.innerApiCalls.updateDiscoveryConfig(request, options, callback);
754
+ }
755
+ getDiscoveryConfig(request, optionsOrCallback, callback) {
756
+ var _a;
757
+ request = request || {};
758
+ let options;
759
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
760
+ callback = optionsOrCallback;
761
+ options = {};
762
+ }
763
+ else {
764
+ options = optionsOrCallback;
765
+ }
766
+ options = options || {};
767
+ options.otherArgs = options.otherArgs || {};
768
+ options.otherArgs.headers = options.otherArgs.headers || {};
769
+ options.otherArgs.headers['x-goog-request-params'] =
770
+ this._gaxModule.routingHeader.fromParams({
771
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
772
+ });
773
+ this.initialize();
774
+ return this.innerApiCalls.getDiscoveryConfig(request, options, callback);
775
+ }
776
+ deleteDiscoveryConfig(request, optionsOrCallback, callback) {
777
+ var _a;
778
+ request = request || {};
779
+ let options;
780
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
781
+ callback = optionsOrCallback;
782
+ options = {};
783
+ }
784
+ else {
785
+ options = optionsOrCallback;
786
+ }
787
+ options = options || {};
788
+ options.otherArgs = options.otherArgs || {};
789
+ options.otherArgs.headers = options.otherArgs.headers || {};
790
+ options.otherArgs.headers['x-goog-request-params'] =
791
+ this._gaxModule.routingHeader.fromParams({
792
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
793
+ });
794
+ this.initialize();
795
+ return this.innerApiCalls.deleteDiscoveryConfig(request, options, callback);
796
+ }
705
797
  createDlpJob(request, optionsOrCallback, callback) {
706
798
  var _a;
707
799
  request = request || {};
@@ -959,15 +1051,15 @@ class DlpServiceClient {
959
1051
  *
960
1052
  * parent=projects/example-project/locations/europe-west3
961
1053
  * @param {string} request.pageToken
962
- * Page token to continue retrieval. Comes from previous call
1054
+ * Page token to continue retrieval. Comes from the previous call
963
1055
  * to `ListInspectTemplates`.
964
1056
  * @param {number} request.pageSize
965
- * Size of the page, can be limited by the server. If zero server returns
966
- * a page of max size 100.
1057
+ * Size of the page. This value can be limited by the server. If zero server
1058
+ * returns a page of max size 100.
967
1059
  * @param {string} request.orderBy
968
1060
  * Comma separated list of fields to order by,
969
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
970
- * default sorting order is ascending, redundant space characters are
1061
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1062
+ * default sorting order is ascending. Redundant space characters are
971
1063
  * insignificant.
972
1064
  *
973
1065
  * Example: `name asc,update_time, create_time desc`
@@ -1034,15 +1126,15 @@ class DlpServiceClient {
1034
1126
  *
1035
1127
  * parent=projects/example-project/locations/europe-west3
1036
1128
  * @param {string} request.pageToken
1037
- * Page token to continue retrieval. Comes from previous call
1129
+ * Page token to continue retrieval. Comes from the previous call
1038
1130
  * to `ListInspectTemplates`.
1039
1131
  * @param {number} request.pageSize
1040
- * Size of the page, can be limited by the server. If zero server returns
1041
- * a page of max size 100.
1132
+ * Size of the page. This value can be limited by the server. If zero server
1133
+ * returns a page of max size 100.
1042
1134
  * @param {string} request.orderBy
1043
1135
  * Comma separated list of fields to order by,
1044
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1045
- * default sorting order is ascending, redundant space characters are
1136
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1137
+ * default sorting order is ascending. Redundant space characters are
1046
1138
  * insignificant.
1047
1139
  *
1048
1140
  * Example: `name asc,update_time, create_time desc`
@@ -1129,15 +1221,15 @@ class DlpServiceClient {
1129
1221
  *
1130
1222
  * parent=projects/example-project/locations/europe-west3
1131
1223
  * @param {string} request.pageToken
1132
- * Page token to continue retrieval. Comes from previous call
1224
+ * Page token to continue retrieval. Comes from the previous call
1133
1225
  * to `ListDeidentifyTemplates`.
1134
1226
  * @param {number} request.pageSize
1135
- * Size of the page, can be limited by the server. If zero server returns
1136
- * a page of max size 100.
1227
+ * Size of the page. This value can be limited by the server. If zero server
1228
+ * returns a page of max size 100.
1137
1229
  * @param {string} request.orderBy
1138
1230
  * Comma separated list of fields to order by,
1139
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1140
- * default sorting order is ascending, redundant space characters are
1231
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1232
+ * default sorting order is ascending. Redundant space characters are
1141
1233
  * insignificant.
1142
1234
  *
1143
1235
  * Example: `name asc,update_time, create_time desc`
@@ -1204,15 +1296,15 @@ class DlpServiceClient {
1204
1296
  *
1205
1297
  * parent=projects/example-project/locations/europe-west3
1206
1298
  * @param {string} request.pageToken
1207
- * Page token to continue retrieval. Comes from previous call
1299
+ * Page token to continue retrieval. Comes from the previous call
1208
1300
  * to `ListDeidentifyTemplates`.
1209
1301
  * @param {number} request.pageSize
1210
- * Size of the page, can be limited by the server. If zero server returns
1211
- * a page of max size 100.
1302
+ * Size of the page. This value can be limited by the server. If zero server
1303
+ * returns a page of max size 100.
1212
1304
  * @param {string} request.orderBy
1213
1305
  * Comma separated list of fields to order by,
1214
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1215
- * default sorting order is ascending, redundant space characters are
1306
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1307
+ * default sorting order is ascending. Redundant space characters are
1216
1308
  * insignificant.
1217
1309
  *
1218
1310
  * Example: `name asc,update_time, create_time desc`
@@ -1295,15 +1387,15 @@ class DlpServiceClient {
1295
1387
  *
1296
1388
  * parent=projects/example-project/locations/europe-west3
1297
1389
  * @param {string} request.pageToken
1298
- * Page token to continue retrieval. Comes from previous call
1390
+ * Page token to continue retrieval. Comes from the previous call
1299
1391
  * to ListJobTriggers. `order_by` field must not
1300
1392
  * change for subsequent calls.
1301
1393
  * @param {number} request.pageSize
1302
- * Size of the page, can be limited by a server.
1394
+ * Size of the page. This value can be limited by a server.
1303
1395
  * @param {string} request.orderBy
1304
1396
  * Comma separated list of triggeredJob fields to order by,
1305
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1306
- * default sorting order is ascending, redundant space characters are
1397
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1398
+ * default sorting order is ascending. Redundant space characters are
1307
1399
  * insignificant.
1308
1400
  *
1309
1401
  * Example: `name asc,update_time, create_time desc`
@@ -1395,15 +1487,15 @@ class DlpServiceClient {
1395
1487
  *
1396
1488
  * parent=projects/example-project/locations/europe-west3
1397
1489
  * @param {string} request.pageToken
1398
- * Page token to continue retrieval. Comes from previous call
1490
+ * Page token to continue retrieval. Comes from the previous call
1399
1491
  * to ListJobTriggers. `order_by` field must not
1400
1492
  * change for subsequent calls.
1401
1493
  * @param {number} request.pageSize
1402
- * Size of the page, can be limited by a server.
1494
+ * Size of the page. This value can be limited by a server.
1403
1495
  * @param {string} request.orderBy
1404
1496
  * Comma separated list of triggeredJob fields to order by,
1405
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1406
- * default sorting order is ascending, redundant space characters are
1497
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1498
+ * default sorting order is ascending. Redundant space characters are
1407
1499
  * insignificant.
1408
1500
  *
1409
1501
  * Example: `name asc,update_time, create_time desc`
@@ -1472,6 +1564,150 @@ class DlpServiceClient {
1472
1564
  this.initialize();
1473
1565
  return this.descriptors.page.listJobTriggers.asyncIterate(this.innerApiCalls['listJobTriggers'], request, callSettings);
1474
1566
  }
1567
+ listDiscoveryConfigs(request, optionsOrCallback, callback) {
1568
+ var _a;
1569
+ request = request || {};
1570
+ let options;
1571
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1572
+ callback = optionsOrCallback;
1573
+ options = {};
1574
+ }
1575
+ else {
1576
+ options = optionsOrCallback;
1577
+ }
1578
+ options = options || {};
1579
+ options.otherArgs = options.otherArgs || {};
1580
+ options.otherArgs.headers = options.otherArgs.headers || {};
1581
+ options.otherArgs.headers['x-goog-request-params'] =
1582
+ this._gaxModule.routingHeader.fromParams({
1583
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1584
+ });
1585
+ this.initialize();
1586
+ return this.innerApiCalls.listDiscoveryConfigs(request, options, callback);
1587
+ }
1588
+ /**
1589
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1590
+ * @param {Object} request
1591
+ * The request object that will be sent.
1592
+ * @param {string} request.parent
1593
+ * Required. Parent resource name.
1594
+ *
1595
+ * The format of this value is as follows:
1596
+ * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1597
+ *
1598
+ * The following example `parent` string specifies a parent project with the
1599
+ * identifier `example-project`, and specifies the `europe-west3` location
1600
+ * for processing data:
1601
+ *
1602
+ * parent=projects/example-project/locations/europe-west3
1603
+ * @param {string} request.pageToken
1604
+ * Page token to continue retrieval. Comes from the previous call
1605
+ * to ListDiscoveryConfigs. `order_by` field must not
1606
+ * change for subsequent calls.
1607
+ * @param {number} request.pageSize
1608
+ * Size of the page. This value can be limited by a server.
1609
+ * @param {string} request.orderBy
1610
+ * Comma separated list of config fields to order by,
1611
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1612
+ * default sorting order is ascending. Redundant space characters are
1613
+ * insignificant.
1614
+ *
1615
+ * Example: `name asc,update_time, create_time desc`
1616
+ *
1617
+ * Supported fields are:
1618
+ *
1619
+ * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran.
1620
+ * - `name`: corresponds to the DiscoveryConfig's name.
1621
+ * - `status`: corresponds to DiscoveryConfig's status.
1622
+ * @param {object} [options]
1623
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1624
+ * @returns {Stream}
1625
+ * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig} on 'data' event.
1626
+ * The client library will perform auto-pagination by default: it will call the API as many
1627
+ * times as needed. Note that it can affect your quota.
1628
+ * We recommend using `listDiscoveryConfigsAsync()`
1629
+ * method described below for async iteration which you can stop as needed.
1630
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1631
+ * for more details and examples.
1632
+ */
1633
+ listDiscoveryConfigsStream(request, options) {
1634
+ var _a;
1635
+ request = request || {};
1636
+ options = options || {};
1637
+ options.otherArgs = options.otherArgs || {};
1638
+ options.otherArgs.headers = options.otherArgs.headers || {};
1639
+ options.otherArgs.headers['x-goog-request-params'] =
1640
+ this._gaxModule.routingHeader.fromParams({
1641
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1642
+ });
1643
+ const defaultCallSettings = this._defaults['listDiscoveryConfigs'];
1644
+ const callSettings = defaultCallSettings.merge(options);
1645
+ this.initialize();
1646
+ return this.descriptors.page.listDiscoveryConfigs.createStream(this.innerApiCalls.listDiscoveryConfigs, request, callSettings);
1647
+ }
1648
+ /**
1649
+ * Equivalent to `listDiscoveryConfigs`, but returns an iterable object.
1650
+ *
1651
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1652
+ * @param {Object} request
1653
+ * The request object that will be sent.
1654
+ * @param {string} request.parent
1655
+ * Required. Parent resource name.
1656
+ *
1657
+ * The format of this value is as follows:
1658
+ * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1659
+ *
1660
+ * The following example `parent` string specifies a parent project with the
1661
+ * identifier `example-project`, and specifies the `europe-west3` location
1662
+ * for processing data:
1663
+ *
1664
+ * parent=projects/example-project/locations/europe-west3
1665
+ * @param {string} request.pageToken
1666
+ * Page token to continue retrieval. Comes from the previous call
1667
+ * to ListDiscoveryConfigs. `order_by` field must not
1668
+ * change for subsequent calls.
1669
+ * @param {number} request.pageSize
1670
+ * Size of the page. This value can be limited by a server.
1671
+ * @param {string} request.orderBy
1672
+ * Comma separated list of config fields to order by,
1673
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1674
+ * default sorting order is ascending. Redundant space characters are
1675
+ * insignificant.
1676
+ *
1677
+ * Example: `name asc,update_time, create_time desc`
1678
+ *
1679
+ * Supported fields are:
1680
+ *
1681
+ * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran.
1682
+ * - `name`: corresponds to the DiscoveryConfig's name.
1683
+ * - `status`: corresponds to DiscoveryConfig's status.
1684
+ * @param {object} [options]
1685
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1686
+ * @returns {Object}
1687
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1688
+ * When you iterate the returned iterable, each element will be an object representing
1689
+ * {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. The API will be called under the hood as needed, once per the page,
1690
+ * so you can stop the iteration when you don't need more results.
1691
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1692
+ * for more details and examples.
1693
+ * @example <caption>include:samples/generated/v2/dlp_service.list_discovery_configs.js</caption>
1694
+ * region_tag:dlp_v2_generated_DlpService_ListDiscoveryConfigs_async
1695
+ */
1696
+ listDiscoveryConfigsAsync(request, options) {
1697
+ var _a;
1698
+ request = request || {};
1699
+ options = options || {};
1700
+ options.otherArgs = options.otherArgs || {};
1701
+ options.otherArgs.headers = options.otherArgs.headers || {};
1702
+ options.otherArgs.headers['x-goog-request-params'] =
1703
+ this._gaxModule.routingHeader.fromParams({
1704
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1705
+ });
1706
+ const defaultCallSettings = this._defaults['listDiscoveryConfigs'];
1707
+ const callSettings = defaultCallSettings.merge(options);
1708
+ this.initialize();
1709
+ return this.descriptors.page.listDiscoveryConfigs.asyncIterate(this.innerApiCalls['listDiscoveryConfigs'], request, callSettings);
1710
+ }
1475
1711
  listDlpJobs(request, optionsOrCallback, callback) {
1476
1712
  var _a;
1477
1713
  request = request || {};
@@ -1551,8 +1787,8 @@ class DlpServiceClient {
1551
1787
  * The type of job. Defaults to `DlpJobType.INSPECT`
1552
1788
  * @param {string} request.orderBy
1553
1789
  * Comma separated list of fields to order by,
1554
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1555
- * default sorting order is ascending, redundant space characters are
1790
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1791
+ * default sorting order is ascending. Redundant space characters are
1556
1792
  * insignificant.
1557
1793
  *
1558
1794
  * Example: `name asc, end_time asc, create_time desc`
@@ -1651,8 +1887,8 @@ class DlpServiceClient {
1651
1887
  * The type of job. Defaults to `DlpJobType.INSPECT`
1652
1888
  * @param {string} request.orderBy
1653
1889
  * Comma separated list of fields to order by,
1654
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1655
- * default sorting order is ascending, redundant space characters are
1890
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1891
+ * default sorting order is ascending. Redundant space characters are
1656
1892
  * insignificant.
1657
1893
  *
1658
1894
  * Example: `name asc, end_time asc, create_time desc`
@@ -1735,15 +1971,15 @@ class DlpServiceClient {
1735
1971
  *
1736
1972
  * parent=projects/example-project/locations/europe-west3
1737
1973
  * @param {string} request.pageToken
1738
- * Page token to continue retrieval. Comes from previous call
1974
+ * Page token to continue retrieval. Comes from the previous call
1739
1975
  * to `ListStoredInfoTypes`.
1740
1976
  * @param {number} request.pageSize
1741
- * Size of the page, can be limited by the server. If zero server returns
1742
- * a page of max size 100.
1977
+ * Size of the page. This value can be limited by the server. If zero server
1978
+ * returns a page of max size 100.
1743
1979
  * @param {string} request.orderBy
1744
1980
  * Comma separated list of fields to order by,
1745
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1746
- * default sorting order is ascending, redundant space characters are
1981
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
1982
+ * default sorting order is ascending. Redundant space characters are
1747
1983
  * insignificant.
1748
1984
  *
1749
1985
  * Example: `name asc, display_name, create_time desc`
@@ -1807,15 +2043,15 @@ class DlpServiceClient {
1807
2043
  *
1808
2044
  * parent=projects/example-project/locations/europe-west3
1809
2045
  * @param {string} request.pageToken
1810
- * Page token to continue retrieval. Comes from previous call
2046
+ * Page token to continue retrieval. Comes from the previous call
1811
2047
  * to `ListStoredInfoTypes`.
1812
2048
  * @param {number} request.pageSize
1813
- * Size of the page, can be limited by the server. If zero server returns
1814
- * a page of max size 100.
2049
+ * Size of the page. This value can be limited by the server. If zero server
2050
+ * returns a page of max size 100.
1815
2051
  * @param {string} request.orderBy
1816
2052
  * Comma separated list of fields to order by,
1817
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1818
- * default sorting order is ascending, redundant space characters are
2053
+ * followed by `asc` or `desc` postfix. This list is case insensitive. The
2054
+ * default sorting order is ascending. Redundant space characters are
1819
2055
  * insignificant.
1820
2056
  *
1821
2057
  * Example: `name asc, display_name, create_time desc`
@@ -1914,6 +2150,51 @@ class DlpServiceClient {
1914
2150
  // --------------------
1915
2151
  // -- Path templates --
1916
2152
  // --------------------
2153
+ /**
2154
+ * Return a fully-qualified discoveryConfig resource name string.
2155
+ *
2156
+ * @param {string} project
2157
+ * @param {string} location
2158
+ * @param {string} discovery_config
2159
+ * @returns {string} Resource name string.
2160
+ */
2161
+ discoveryConfigPath(project, location, discoveryConfig) {
2162
+ return this.pathTemplates.discoveryConfigPathTemplate.render({
2163
+ project: project,
2164
+ location: location,
2165
+ discovery_config: discoveryConfig,
2166
+ });
2167
+ }
2168
+ /**
2169
+ * Parse the project from DiscoveryConfig resource.
2170
+ *
2171
+ * @param {string} discoveryConfigName
2172
+ * A fully-qualified path representing DiscoveryConfig resource.
2173
+ * @returns {string} A string representing the project.
2174
+ */
2175
+ matchProjectFromDiscoveryConfigName(discoveryConfigName) {
2176
+ return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).project;
2177
+ }
2178
+ /**
2179
+ * Parse the location from DiscoveryConfig resource.
2180
+ *
2181
+ * @param {string} discoveryConfigName
2182
+ * A fully-qualified path representing DiscoveryConfig resource.
2183
+ * @returns {string} A string representing the location.
2184
+ */
2185
+ matchLocationFromDiscoveryConfigName(discoveryConfigName) {
2186
+ return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).location;
2187
+ }
2188
+ /**
2189
+ * Parse the discovery_config from DiscoveryConfig resource.
2190
+ *
2191
+ * @param {string} discoveryConfigName
2192
+ * A fully-qualified path representing DiscoveryConfig resource.
2193
+ * @returns {string} A string representing the discovery_config.
2194
+ */
2195
+ matchDiscoveryConfigFromDiscoveryConfigName(discoveryConfigName) {
2196
+ return this.pathTemplates.discoveryConfigPathTemplate.match(discoveryConfigName).discovery_config;
2197
+ }
1917
2198
  /**
1918
2199
  * Return a fully-qualified finding resource name string.
1919
2200
  *
@@ -1959,6 +2240,39 @@ class DlpServiceClient {
1959
2240
  matchFindingFromFindingName(findingName) {
1960
2241
  return this.pathTemplates.findingPathTemplate.match(findingName).finding;
1961
2242
  }
2243
+ /**
2244
+ * Return a fully-qualified location resource name string.
2245
+ *
2246
+ * @param {string} project
2247
+ * @param {string} location
2248
+ * @returns {string} Resource name string.
2249
+ */
2250
+ locationPath(project, location) {
2251
+ return this.pathTemplates.locationPathTemplate.render({
2252
+ project: project,
2253
+ location: location,
2254
+ });
2255
+ }
2256
+ /**
2257
+ * Parse the project from Location resource.
2258
+ *
2259
+ * @param {string} locationName
2260
+ * A fully-qualified path representing Location resource.
2261
+ * @returns {string} A string representing the project.
2262
+ */
2263
+ matchProjectFromLocationName(locationName) {
2264
+ return this.pathTemplates.locationPathTemplate.match(locationName).project;
2265
+ }
2266
+ /**
2267
+ * Parse the location from Location resource.
2268
+ *
2269
+ * @param {string} locationName
2270
+ * A fully-qualified path representing Location resource.
2271
+ * @returns {string} A string representing the location.
2272
+ */
2273
+ matchLocationFromLocationName(locationName) {
2274
+ return this.pathTemplates.locationPathTemplate.match(locationName).location;
2275
+ }
1962
2276
  /**
1963
2277
  * Return a fully-qualified organization resource name string.
1964
2278
  *
@@ -130,6 +130,31 @@
130
130
  "retry_codes_name": "non_idempotent",
131
131
  "retry_params_name": "default"
132
132
  },
133
+ "CreateDiscoveryConfig": {
134
+ "timeout_millis": 300000,
135
+ "retry_codes_name": "non_idempotent",
136
+ "retry_params_name": "default"
137
+ },
138
+ "UpdateDiscoveryConfig": {
139
+ "timeout_millis": 300000,
140
+ "retry_codes_name": "non_idempotent",
141
+ "retry_params_name": "default"
142
+ },
143
+ "GetDiscoveryConfig": {
144
+ "timeout_millis": 300000,
145
+ "retry_codes_name": "idempotent",
146
+ "retry_params_name": "default"
147
+ },
148
+ "ListDiscoveryConfigs": {
149
+ "timeout_millis": 300000,
150
+ "retry_codes_name": "idempotent",
151
+ "retry_params_name": "default"
152
+ },
153
+ "DeleteDiscoveryConfig": {
154
+ "timeout_millis": 300000,
155
+ "retry_codes_name": "idempotent",
156
+ "retry_params_name": "default"
157
+ },
133
158
  "CreateDlpJob": {
134
159
  "timeout_millis": 300000,
135
160
  "retry_codes_name": "non_idempotent",
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": "5.0.1",
4
+ "version": "5.1.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc",
7
7
  "engines": {
@@ -55,7 +55,7 @@
55
55
  "@types/node": "^20.4.5",
56
56
  "@types/sinon": "^10.0.0",
57
57
  "c8": "^8.0.1",
58
- "gapic-tools": "^0.1.8",
58
+ "gapic-tools": "^0.2.0",
59
59
  "gts": "^5.0.0",
60
60
  "jsdoc": "^4.0.0",
61
61
  "jsdoc-fresh": "^3.0.0",
@@ -63,8 +63,8 @@
63
63
  "linkinator": "4.1.2",
64
64
  "long": "^5.2.3",
65
65
  "mocha": "^9.2.2",
66
- "pack-n-play": "^1.0.0-2",
67
- "sinon": "^15.0.0",
66
+ "pack-n-play": "^2.0.0",
67
+ "sinon": "^17.0.0",
68
68
  "typescript": "^5.1.6"
69
69
  },
70
70
  "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-privacy-dlp"