@@ -53,15 +53,6 @@ var ALL_SCOPES = [
5353 * The service also includes methods for sensitive data redaction and
5454 * scheduling of data scans on Google Cloud Platform based data sets.
5555 *
56- * This will be created through a builder function which can be obtained by the module.
57- * See the following example of how to initialize the module and how to access to the builder.
58- * @see {@link dlpServiceClient }
59- *
60- * @example
61- * var dlpV2beta1 = require('@google-cloud/dlp').v2beta1({
62- * // optional auth parameters.
63- * });
64- * var client = dlpV2beta1.dlpServiceClient();
6556 *
6657 * @class
6758 */
@@ -167,7 +158,7 @@ DlpServiceClient.prototype.getProjectId = function(callback) {
167158// Service calls
168159
169160/**
170- * Find potentially sensitive info in a list of strings.
161+ * Finds potentially sensitive info in a list of strings.
171162 * This method has limits on input size, processing time, and output size.
172163 *
173164 * @param {Object } request
@@ -195,7 +186,12 @@ DlpServiceClient.prototype.getProjectId = function(callback) {
195186 *
196187 * @example
197188 *
198- * var client = dlpV2beta1.dlpServiceClient();
189+ * var dlp = require('@google-cloud/dlp');
190+ *
191+ * var client = dlp.v2beta1({
192+ * // optional auth parameters.
193+ * });
194+ *
199195 * var inspectConfig = {};
200196 * var items = [];
201197 * var request = {
@@ -205,7 +201,8 @@ DlpServiceClient.prototype.getProjectId = function(callback) {
205201 * client.inspectContent(request).then(function(responses) {
206202 * var response = responses[0];
207203 * // doThingsWith(response)
208- * }).catch(function(err) {
204+ * })
205+ * .catch(function(err) {
209206 * console.error(err);
210207 * });
211208 */
@@ -222,7 +219,7 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback)
222219} ;
223220
224221/**
225- * Redact potentially sensitive info from a list of strings.
222+ * Redacts potentially sensitive info from a list of strings.
226223 * This method has limits on input size, processing time, and output size.
227224 *
228225 * @param {Object } request
@@ -236,9 +233,14 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback)
236233 *
237234 * This object should have the same structure as [ContentItem]{@link ContentItem}
238235 * @param {Object[] } request.replaceConfigs
239- * The strings to replace findings with. Must specify at least one.
236+ * The strings to replace findings text findings with. Must specify at least
237+ * one of these or one ImageRedactionConfig if redacting images.
240238 *
241239 * This object should have the same structure as [ReplaceConfig]{@link ReplaceConfig}
240+ * @param {Object[]= } request.imageRedactionConfigs
241+ * The configuration for specifying what content to redact from images.
242+ *
243+ * This object should have the same structure as [ImageRedactionConfig]{@link ImageRedactionConfig}
242244 * @param {Object= } options
243245 * Optional parameters. You can override the default settings for this call, e.g, timeout,
244246 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
@@ -252,7 +254,12 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback)
252254 *
253255 * @example
254256 *
255- * var client = dlpV2beta1.dlpServiceClient();
257+ * var dlp = require('@google-cloud/dlp');
258+ *
259+ * var client = dlp.v2beta1({
260+ * // optional auth parameters.
261+ * });
262+ *
256263 * var inspectConfig = {};
257264 * var items = [];
258265 * var replaceConfigs = [];
@@ -264,7 +271,8 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback)
264271 * client.redactContent(request).then(function(responses) {
265272 * var response = responses[0];
266273 * // doThingsWith(response)
267- * }).catch(function(err) {
274+ * })
275+ * .catch(function(err) {
268276 * console.error(err);
269277 * });
270278 */
@@ -281,7 +289,8 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback)
281289} ;
282290
283291/**
284- * Schedule a job scanning content in a Google Cloud Platform data repository.
292+ * Schedules a job scanning content in a Google Cloud Platform data
293+ * repository.
285294 *
286295 * @param {Object } request
287296 * The request object that will be sent.
@@ -297,15 +306,17 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback)
297306 * Optional location to store findings. The bucket must already exist and
298307 * the Google APIs service account for DLP must have write permission to
299308 * write to the given bucket.
300- * Results will be split over multiple csv files with each file name matching
301- * the pattern "[operation_id] + [count].csv".
302- * The operation_id will match the identifier for the Operation,
303- * and the [count] is a counter used for tracking the number of files written.
304- * The CSV file(s) contain the following columns regardless of storage type
305- * scanned: id, info_type, likelihood, byte size of finding, quote, time_stamp
306- * For cloud storage the next two columns are: file_path, start_offset
307- * For datastore the next two columns are: project_id, namespace_id, path,
308- * column_name, offset.
309+ * <p>Results are split over multiple csv files with each file name matching
310+ * the pattern "[operation_id]_[count].csv", for example
311+ * `3094877188788974909_1.csv`. The `operation_id` matches the
312+ * identifier for the Operation, and the `count` is a counter used for
313+ * tracking the number of files written. <p>The CSV file(s) contain the
314+ * following columns regardless of storage type scanned: <li>id <li>info_type
315+ * <li>likelihood <li>byte size of finding <li>quote <li>time_stamp<br/>
316+ * <p>For Cloud Storage the next columns are: <li>file_path
317+ * <li>start_offset<br/>
318+ * <p>For Cloud Datastore the next columns are: <li>project_id
319+ * <li>namespace_id <li>path <li>column_name <li>offset
309320 *
310321 * This object should have the same structure as [OutputStorageConfig]{@link OutputStorageConfig}
311322 * @param {Object= } options
@@ -321,7 +332,12 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback)
321332 *
322333 * @example
323334 *
324- * var client = dlpV2beta1.dlpServiceClient();
335+ * var dlp = require('@google-cloud/dlp');
336+ *
337+ * var client = dlp.v2beta1({
338+ * // optional auth parameters.
339+ * });
340+ *
325341 * var inspectConfig = {};
326342 * var storageConfig = {};
327343 * var outputConfig = {};
@@ -347,10 +363,20 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback)
347363 *
348364 * // The response of the api call returning the complete operation.
349365 * var finalApiResponse = responses[2];
350- * }).catch(function(err) {
366+ * })
367+ * .catch(function(err) {
351368 * console.error(err);
352369 * });
353370 *
371+ * var inspectConfig = {};
372+ * var storageConfig = {};
373+ * var outputConfig = {};
374+ * var request = {
375+ * inspectConfig: inspectConfig,
376+ * storageConfig: storageConfig,
377+ * outputConfig: outputConfig
378+ * };
379+ *
354380 * // Handle the operation using the event emitter pattern.
355381 * client.createInspectOperation(request).then(function(responses) {
356382 * var operation = responses[0];
@@ -372,7 +398,8 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback)
372398 * operation.on('error', function(err) {
373399 * // throw(err);
374400 * })
375- * }).catch(function(err) {
401+ * })
402+ * .catch(function(err) {
376403 * console.error(err);
377404 * });
378405 */
@@ -399,11 +426,19 @@ DlpServiceClient.prototype.createInspectOperation = function(request, options, c
399426 * Should be in the format of `inspect/results/{id}.
400427 * @param {number= } request.pageSize
401428 * Maximum number of results to return.
402- * If 0, the implementation will select a reasonable value.
429+ * If 0, the implementation selects a reasonable value.
403430 * @param {string= } request.pageToken
404431 * The value returned by the last `ListInspectFindingsResponse`; indicates
405432 * that this is a continuation of a prior `ListInspectFindings` call, and that
406433 * the system should return the next page of data.
434+ * @param {string= } request.filter
435+ * Restricts findings to items that match. Supports info_type and likelihood.
436+ * <p>Examples:<br/>
437+ * <li>info_type=EMAIL_ADDRESS
438+ * <li>info_type=PHONE_NUMBER,EMAIL_ADDRESS
439+ * <li>likelihood=VERY_LIKELY
440+ * <li>likelihood=VERY_LIKELY,LIKELY
441+ * <li>info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY
407442 * @param {Object= } options
408443 * Optional parameters. You can override the default settings for this call, e.g, timeout,
409444 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
@@ -417,12 +452,18 @@ DlpServiceClient.prototype.createInspectOperation = function(request, options, c
417452 *
418453 * @example
419454 *
420- * var client = dlpV2beta1.dlpServiceClient();
455+ * var dlp = require('@google-cloud/dlp');
456+ *
457+ * var client = dlp.v2beta1({
458+ * // optional auth parameters.
459+ * });
460+ *
421461 * var formattedName = client.resultPath("[RESULT]");
422462 * client.listInspectFindings({name: formattedName}).then(function(responses) {
423463 * var response = responses[0];
424464 * // doThingsWith(response)
425- * }).catch(function(err) {
465+ * })
466+ * .catch(function(err) {
426467 * console.error(err);
427468 * });
428469 */
@@ -462,7 +503,12 @@ DlpServiceClient.prototype.listInspectFindings = function(request, options, call
462503 *
463504 * @example
464505 *
465- * var client = dlpV2beta1.dlpServiceClient();
506+ * var dlp = require('@google-cloud/dlp');
507+ *
508+ * var client = dlp.v2beta1({
509+ * // optional auth parameters.
510+ * });
511+ *
466512 * var category = '';
467513 * var languageCode = '';
468514 * var request = {
@@ -472,7 +518,8 @@ DlpServiceClient.prototype.listInspectFindings = function(request, options, call
472518 * client.listInfoTypes(request).then(function(responses) {
473519 * var response = responses[0];
474520 * // doThingsWith(response)
475- * }).catch(function(err) {
521+ * })
522+ * .catch(function(err) {
476523 * console.error(err);
477524 * });
478525 */
@@ -510,12 +557,18 @@ DlpServiceClient.prototype.listInfoTypes = function(request, options, callback)
510557 *
511558 * @example
512559 *
513- * var client = dlpV2beta1.dlpServiceClient();
560+ * var dlp = require('@google-cloud/dlp');
561+ *
562+ * var client = dlp.v2beta1({
563+ * // optional auth parameters.
564+ * });
565+ *
514566 * var languageCode = '';
515567 * client.listRootCategories({languageCode: languageCode}).then(function(responses) {
516568 * var response = responses[0];
517569 * // doThingsWith(response)
518- * }).catch(function(err) {
570+ * })
571+ * .catch(function(err) {
519572 * console.error(err);
520573 * });
521574 */
0 commit comments