diff --git a/packages/dlp/src/v2beta1/dlp_service_client.js b/packages/dlp/src/v2beta1/dlp_service_client.js index d9225aaf614..9f7fac6f1de 100644 --- a/packages/dlp/src/v2beta1/dlp_service_client.js +++ b/packages/dlp/src/v2beta1/dlp_service_client.js @@ -53,15 +53,6 @@ var ALL_SCOPES = [ * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. * - * This will be created through a builder function which can be obtained by the module. - * See the following example of how to initialize the module and how to access to the builder. - * @see {@link dlpServiceClient} - * - * @example - * var dlpV2beta1 = require('@google-cloud/dlp').v2beta1({ - * // optional auth parameters. - * }); - * var client = dlpV2beta1.dlpServiceClient(); * * @class */ @@ -167,7 +158,7 @@ DlpServiceClient.prototype.getProjectId = function(callback) { // Service calls /** - * Find potentially sensitive info in a list of strings. + * Finds potentially sensitive info in a list of strings. * This method has limits on input size, processing time, and output size. * * @param {Object} request @@ -195,7 +186,12 @@ DlpServiceClient.prototype.getProjectId = function(callback) { * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var inspectConfig = {}; * var items = []; * var request = { @@ -205,7 +201,8 @@ DlpServiceClient.prototype.getProjectId = function(callback) { * client.inspectContent(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -222,7 +219,7 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback) }; /** - * Redact potentially sensitive info from a list of strings. + * Redacts potentially sensitive info from a list of strings. * This method has limits on input size, processing time, and output size. * * @param {Object} request @@ -236,9 +233,14 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback) * * This object should have the same structure as [ContentItem]{@link ContentItem} * @param {Object[]} request.replaceConfigs - * The strings to replace findings with. Must specify at least one. + * The strings to replace findings text findings with. Must specify at least + * one of these or one ImageRedactionConfig if redacting images. * * This object should have the same structure as [ReplaceConfig]{@link ReplaceConfig} + * @param {Object[]=} request.imageRedactionConfigs + * The configuration for specifying what content to redact from images. + * + * This object should have the same structure as [ImageRedactionConfig]{@link ImageRedactionConfig} * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * 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) * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var inspectConfig = {}; * var items = []; * var replaceConfigs = []; @@ -264,7 +271,8 @@ DlpServiceClient.prototype.inspectContent = function(request, options, callback) * client.redactContent(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -281,7 +289,8 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback) }; /** - * Schedule a job scanning content in a Google Cloud Platform data repository. + * Schedules a job scanning content in a Google Cloud Platform data + * repository. * * @param {Object} request * The request object that will be sent. @@ -297,15 +306,17 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback) * Optional location to store findings. The bucket must already exist and * the Google APIs service account for DLP must have write permission to * write to the given bucket. - * Results will be split over multiple csv files with each file name matching - * the pattern "[operation_id] + [count].csv". - * The operation_id will match the identifier for the Operation, - * and the [count] is a counter used for tracking the number of files written. - * The CSV file(s) contain the following columns regardless of storage type - * scanned: id, info_type, likelihood, byte size of finding, quote, time_stamp - * For cloud storage the next two columns are: file_path, start_offset - * For datastore the next two columns are: project_id, namespace_id, path, - * column_name, offset. + *

Results are split over multiple csv files with each file name matching + * the pattern "[operation_id]_[count].csv", for example + * `3094877188788974909_1.csv`. The `operation_id` matches the + * identifier for the Operation, and the `count` is a counter used for + * tracking the number of files written.

The CSV file(s) contain the + * following columns regardless of storage type scanned:

  • id
  • info_type + *
  • likelihood
  • byte size of finding
  • quote
  • time_stamp
    + *

    For Cloud Storage the next columns are:

  • file_path + *
  • start_offset
    + *

    For Cloud Datastore the next columns are:

  • project_id + *
  • namespace_id
  • path
  • column_name
  • offset * * This object should have the same structure as [OutputStorageConfig]{@link OutputStorageConfig} * @param {Object=} options @@ -321,7 +332,12 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback) * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var inspectConfig = {}; * var storageConfig = {}; * var outputConfig = {}; @@ -347,10 +363,20 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback) * * // The response of the api call returning the complete operation. * var finalApiResponse = responses[2]; - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); * + * var inspectConfig = {}; + * var storageConfig = {}; + * var outputConfig = {}; + * var request = { + * inspectConfig: inspectConfig, + * storageConfig: storageConfig, + * outputConfig: outputConfig + * }; + * * // Handle the operation using the event emitter pattern. * client.createInspectOperation(request).then(function(responses) { * var operation = responses[0]; @@ -372,7 +398,8 @@ DlpServiceClient.prototype.redactContent = function(request, options, callback) * operation.on('error', function(err) { * // throw(err); * }) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -399,11 +426,19 @@ DlpServiceClient.prototype.createInspectOperation = function(request, options, c * Should be in the format of `inspect/results/{id}. * @param {number=} request.pageSize * Maximum number of results to return. - * If 0, the implementation will select a reasonable value. + * If 0, the implementation selects a reasonable value. * @param {string=} request.pageToken * The value returned by the last `ListInspectFindingsResponse`; indicates * that this is a continuation of a prior `ListInspectFindings` call, and that * the system should return the next page of data. + * @param {string=} request.filter + * Restricts findings to items that match. Supports info_type and likelihood. + *

    Examples:
    + *

  • info_type=EMAIL_ADDRESS + *
  • info_type=PHONE_NUMBER,EMAIL_ADDRESS + *
  • likelihood=VERY_LIKELY + *
  • likelihood=VERY_LIKELY,LIKELY + *
  • info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY * @param {Object=} options * Optional parameters. You can override the default settings for this call, e.g, timeout, * 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 * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var formattedName = client.resultPath("[RESULT]"); * client.listInspectFindings({name: formattedName}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -462,7 +503,12 @@ DlpServiceClient.prototype.listInspectFindings = function(request, options, call * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var category = ''; * var languageCode = ''; * var request = { @@ -472,7 +518,8 @@ DlpServiceClient.prototype.listInspectFindings = function(request, options, call * client.listInfoTypes(request).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ @@ -510,12 +557,18 @@ DlpServiceClient.prototype.listInfoTypes = function(request, options, callback) * * @example * - * var client = dlpV2beta1.dlpServiceClient(); + * var dlp = require('@google-cloud/dlp'); + * + * var client = dlp.v2beta1({ + * // optional auth parameters. + * }); + * * var languageCode = ''; * client.listRootCategories({languageCode: languageCode}).then(function(responses) { * var response = responses[0]; * // doThingsWith(response) - * }).catch(function(err) { + * }) + * .catch(function(err) { * console.error(err); * }); */ diff --git a/packages/dlp/src/v2beta1/doc/doc_dlp.js b/packages/dlp/src/v2beta1/doc/doc_dlp.js new file mode 100644 index 00000000000..499e1631340 --- /dev/null +++ b/packages/dlp/src/v2beta1/doc/doc_dlp.js @@ -0,0 +1,667 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * Configuration description of the scanning process. + * When used with redactContent only info_types and min_likelihood are currently + * used. + * + * @property {Object[]} infoTypes + * Restricts what info_types to look for. The values must correspond to + * InfoType values returned by ListInfoTypes or found in documentation. + * Empty info_types runs all enabled detectors. + * + * This object should have the same structure as [InfoType]{@link InfoType} + * + * @property {number} minLikelihood + * Only returns findings equal or above this threshold. + * + * The number should be among the values of [Likelihood]{@link Likelihood} + * + * @property {number} maxFindings + * Limits the number of findings per content item. + * + * @property {boolean} includeQuote + * When true, a contextual quote from the data that triggered a finding is + * included in the response; see Finding.quote. + * + * @property {boolean} excludeTypes + * When true, excludes type information of the findings. + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Container structure for the content to inspect. + * + * @property {string} type + * Type of the content, as defined in Content-Type HTTP header. + * Supported types are: all "text" types, octet streams, PNG images, + * JPEG images. + * + * @property {string} data + * Content data to inspect or redact. + * + * @property {string} value + * String data to inspect or redact. + * + * @class + * @see [google.privacy.dlp.v2beta1.ContentItem definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ContentItem = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * All the findings for a single scanned item. + * + * @property {Object[]} findings + * List of findings for an item. + * + * This object should have the same structure as [Finding]{@link Finding} + * + * @property {boolean} findingsTruncated + * If true, then this item might have more findings than were returned, + * and the findings returned are an arbitrary subset of all findings. + * The findings list might be truncated because the input items were too + * large, or because the server reached the maximum amount of resources + * allowed for a single API call. For best results, divide the input into + * smaller batches. + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectResult = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Container structure describing a single finding within a string or image. + * + * @property {string} quote + * The specific string that may be potentially sensitive info. + * + * @property {Object} infoType + * The specific type of info the string might be. + * + * This object should have the same structure as [InfoType]{@link InfoType} + * + * @property {number} likelihood + * Estimate of how likely it is that the info_type is correct. + * + * The number should be among the values of [Likelihood]{@link Likelihood} + * + * @property {Object} location + * Location of the info found. + * + * This object should have the same structure as [Location]{@link Location} + * + * @property {Object} createTime + * Timestamp when finding was detected. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @class + * @see [google.privacy.dlp.v2beta1.Finding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var Finding = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Specifies the location of a finding within its source item. + * + * @property {Object} byteRange + * Zero-based byte offsets within a content item. + * + * This object should have the same structure as [Range]{@link Range} + * + * @property {Object} codepointRange + * Character offsets within a content item, included when content type + * is a text. Default charset assumed to be UTF-8. + * + * This object should have the same structure as [Range]{@link Range} + * + * @property {Object[]} imageBoxes + * Location within an image's pixels. + * + * This object should have the same structure as [ImageLocation]{@link ImageLocation} + * + * @property {Object} recordKey + * Key of the finding. + * + * This object should have the same structure as [RecordKey]{@link RecordKey} + * + * @property {Object} fieldId + * Field id of the field containing the finding. + * + * This object should have the same structure as [FieldId]{@link FieldId} + * + * @class + * @see [google.privacy.dlp.v2beta1.Location definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var Location = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Generic half-open interval [start, end) + * + * @property {number} start + * Index of the first character of the range (inclusive). + * + * @property {number} end + * Index of the last character of the range (exclusive). + * + * @class + * @see [google.privacy.dlp.v2beta1.Range definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var Range = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Bounding box encompassing detected text within an image. + * + * @property {number} top + * Top coordinate of the bounding box. (0,0) is upper left. + * + * @property {number} left + * Left coordinate of the bounding box. (0,0) is upper left. + * + * @property {number} width + * Width of the bounding box in pixels. + * + * @property {number} height + * Height of the bounding box in pixels. + * + * @class + * @see [google.privacy.dlp.v2beta1.ImageLocation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ImageLocation = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to search for potentially sensitive info in a list of items + * and replace it with a default or provided content. + * + * @property {Object} inspectConfig + * Configuration for the inspector. + * + * This object should have the same structure as [InspectConfig]{@link InspectConfig} + * + * @property {Object[]} items + * The list of items to inspect. Up to 100 are allowed per request. + * + * This object should have the same structure as [ContentItem]{@link ContentItem} + * + * @property {Object[]} replaceConfigs + * The strings to replace findings text findings with. Must specify at least + * one of these or one ImageRedactionConfig if redacting images. + * + * This object should have the same structure as [ReplaceConfig]{@link ReplaceConfig} + * + * @property {Object[]} imageRedactionConfigs + * The configuration for specifying what content to redact from images. + * + * This object should have the same structure as [ImageRedactionConfig]{@link ImageRedactionConfig} + * + * @class + * @see [google.privacy.dlp.v2beta1.RedactContentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var RedactContentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * @property {Object} infoType + * Type of information to replace. Only one ReplaceConfig per info_type + * should be provided. If ReplaceConfig does not have an info_type, the DLP + * API matches it against all info_types that are found but not specified in + * another ReplaceConfig. + * + * This object should have the same structure as [InfoType]{@link InfoType} + * + * @property {string} replaceWith + * Content replacing sensitive information of given type. Max 256 chars. + * + * @class + * @see [google.privacy.dlp.v2beta1.RedactContentRequest.ReplaceConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ + ReplaceConfig: { + // This is for documentation. Actual contents will be loaded by gRPC. + }, + + /** + * Configuration for determing how redaction of images should occur. + * + * @property {Object} infoType + * Only one per info_type should be provided per request. If not + * specified, and redact_all_text is false, the DLP API will redacts all + * text that it matches against all info_types that are found, but not + * specified in another ImageRedactionConfig. + * + * This object should have the same structure as [InfoType]{@link InfoType} + * + * @property {boolean} redactAllText + * If true, all text found in the image, regardless if it matches an + * info_type, is redacted. + * + * @property {Object} redactionColor + * The color to use when redacting content from an image. If not specified, + * the default is black. + * + * This object should have the same structure as [Color]{@link Color} + * + * @class + * @see [google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ + ImageRedactionConfig: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * Represents a color in the RGB color space. + * + * @property {number} red + * The amount of red in the color as a value in the interval [0, 1]. + * + * @property {number} green + * The amount of green in the color as a value in the interval [0, 1]. + * + * @property {number} blue + * The amount of blue in the color as a value in the interval [0, 1]. + * + * @class + * @see [google.privacy.dlp.v2beta1.Color definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var Color = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Results of redacting a list of items. + * + * @property {Object[]} items + * The redacted content. + * + * This object should have the same structure as [ContentItem]{@link ContentItem} + * + * @class + * @see [google.privacy.dlp.v2beta1.RedactContentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var RedactContentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to search for potentially sensitive info in a list of items. + * + * @property {Object} inspectConfig + * Configuration for the inspector. + * + * This object should have the same structure as [InspectConfig]{@link InspectConfig} + * + * @property {Object[]} items + * The list of items to inspect. Items in a single request are + * considered "related" unless inspect_config.independent_inputs is true. + * Up to 100 are allowed per request. + * + * This object should have the same structure as [ContentItem]{@link ContentItem} + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectContentRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectContentRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Results of inspecting a list of items. + * + * @property {Object[]} results + * Each content_item from the request has a result in this list, in the + * same order as the request. + * + * This object should have the same structure as [InspectResult]{@link InspectResult} + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectContentResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectContentResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for scheduling a scan of a data subset from a Google Platform data + * repository. + * + * @property {Object} inspectConfig + * Configuration for the inspector. + * + * This object should have the same structure as [InspectConfig]{@link InspectConfig} + * + * @property {Object} storageConfig + * Specification of the data set to process. + * + * This object should have the same structure as [StorageConfig]{@link StorageConfig} + * + * @property {Object} outputConfig + * Optional location to store findings. The bucket must already exist and + * the Google APIs service account for DLP must have write permission to + * write to the given bucket. + *

    Results are split over multiple csv files with each file name matching + * the pattern "[operation_id]_[count].csv", for example + * `3094877188788974909_1.csv`. The `operation_id` matches the + * identifier for the Operation, and the `count` is a counter used for + * tracking the number of files written.

    The CSV file(s) contain the + * following columns regardless of storage type scanned:

  • id
  • info_type + *
  • likelihood
  • byte size of finding
  • quote
  • time_stamp
    + *

    For Cloud Storage the next columns are:

  • file_path + *
  • start_offset
    + *

    For Cloud Datastore the next columns are:

  • project_id + *
  • namespace_id
  • path
  • column_name
  • offset + * + * This object should have the same structure as [OutputStorageConfig]{@link OutputStorageConfig} + * + * @class + * @see [google.privacy.dlp.v2beta1.CreateInspectOperationRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var CreateInspectOperationRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Cloud repository for storing output. + * + * @property {Object} storagePath + * The path to a Google Cloud Storage location to store output. + * + * This object should have the same structure as [CloudStoragePath]{@link CloudStoragePath} + * + * @class + * @see [google.privacy.dlp.v2beta1.OutputStorageConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var OutputStorageConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Statistics regarding a specific InfoType. + * + * @property {Object} infoType + * The type of finding this stat is for. + * + * This object should have the same structure as [InfoType]{@link InfoType} + * + * @property {number} count + * Number of findings for this info type. + * + * @class + * @see [google.privacy.dlp.v2beta1.InfoTypeStatistics definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InfoTypeStatistics = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Metadata returned within GetOperation for an inspect request. + * + * @property {number} processedBytes + * Total size in bytes that were processed. + * + * @property {number} totalEstimatedBytes + * Estimate of the number of bytes to process. + * + * @property {Object[]} infoTypeStats + * This object should have the same structure as [InfoTypeStatistics]{@link InfoTypeStatistics} + * + * @property {Object} createTime + * The time which this request was started. + * + * This object should have the same structure as [google.protobuf.Timestamp]{@link external:"google.protobuf.Timestamp"} + * + * @property {Object} requestInspectConfig + * The inspect config used to create the Operation. + * + * This object should have the same structure as [InspectConfig]{@link InspectConfig} + * + * @property {Object} requestStorageConfig + * The storage config used to create the Operation. + * + * This object should have the same structure as [StorageConfig]{@link StorageConfig} + * + * @property {Object} requestOutputConfig + * Optional location to store findings. + * + * This object should have the same structure as [OutputStorageConfig]{@link OutputStorageConfig} + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectOperationMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectOperationMetadata = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * The operational data. + * + * @property {string} name + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `inspect/results/{id}`. + * + * @class + * @see [google.privacy.dlp.v2beta1.InspectOperationResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InspectOperationResult = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for the list of results in a given inspect operation. + * + * @property {string} name + * Identifier of the results set returned as metadata of + * the longrunning operation created by a call to CreateInspectOperation. + * Should be in the format of `inspect/results/{id}. + * + * @property {number} pageSize + * Maximum number of results to return. + * If 0, the implementation selects a reasonable value. + * + * @property {string} pageToken + * The value returned by the last `ListInspectFindingsResponse`; indicates + * that this is a continuation of a prior `ListInspectFindings` call, and that + * the system should return the next page of data. + * + * @property {string} filter + * Restricts findings to items that match. Supports info_type and likelihood. + *

    Examples:
    + *

  • info_type=EMAIL_ADDRESS + *
  • info_type=PHONE_NUMBER,EMAIL_ADDRESS + *
  • likelihood=VERY_LIKELY + *
  • likelihood=VERY_LIKELY,LIKELY + *
  • info_type=EMAIL_ADDRESS,likelihood=VERY_LIKELY,LIKELY + * + * @class + * @see [google.privacy.dlp.v2beta1.ListInspectFindingsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListInspectFindingsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response to the ListInspectFindings request. + * + * @property {Object} result + * The results. + * + * This object should have the same structure as [InspectResult]{@link InspectResult} + * + * @property {string} nextPageToken + * If not empty, indicates that there may be more results that match the + * request; this value should be passed in a new `ListInspectFindingsRequest`. + * + * @class + * @see [google.privacy.dlp.v2beta1.ListInspectFindingsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListInspectFindingsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Info type description. + * + * @property {string} name + * Internal name of the info type. + * + * @property {string} displayName + * Human readable form of the info type name. + * + * @property {Object[]} categories + * List of categories this info type belongs to. + * + * This object should have the same structure as [CategoryDescription]{@link CategoryDescription} + * + * @class + * @see [google.privacy.dlp.v2beta1.InfoTypeDescription definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var InfoTypeDescription = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for the list of info types belonging to a given category, + * or all supported info types if no category is specified. + * + * @property {string} category + * Category name as returned by ListRootCategories. + * + * @property {string} languageCode + * Optional BCP-47 language code for localized info type friendly + * names. If omitted, or if localized strings are not available, + * en-US strings will be returned. + * + * @class + * @see [google.privacy.dlp.v2beta1.ListInfoTypesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListInfoTypesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response to the ListInfoTypes request. + * + * @property {Object[]} infoTypes + * Set of sensitive info types belonging to a category. + * + * This object should have the same structure as [InfoTypeDescription]{@link InfoTypeDescription} + * + * @class + * @see [google.privacy.dlp.v2beta1.ListInfoTypesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListInfoTypesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Info Type Category description. + * + * @property {string} name + * Internal name of the category. + * + * @property {string} displayName + * Human readable form of the category name. + * + * @class + * @see [google.privacy.dlp.v2beta1.CategoryDescription definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var CategoryDescription = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request for root categories of Info Types supported by the API. + * Example values might include "FINANCE", "HEALTH", "FAST", "DEFAULT". + * + * @property {string} languageCode + * Optional language code for localized friendly category names. + * If omitted or if localized strings are not available, + * en-US strings will be returned. + * + * @class + * @see [google.privacy.dlp.v2beta1.ListRootCategoriesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListRootCategoriesRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response for ListRootCategories request. + * + * @property {Object[]} categories + * List of all into type categories supported by the API. + * + * This object should have the same structure as [CategoryDescription]{@link CategoryDescription} + * + * @class + * @see [google.privacy.dlp.v2beta1.ListRootCategoriesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/dlp.proto} + */ +var ListRootCategoriesResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Categorization of results based on how likely they are to represent a match, + * based on the number of elements they contain which imply a match. + * + * @enum {number} + */ +var Likelihood = { + + /** + * Default value; information with all likelihoods is included. + */ + LIKELIHOOD_UNSPECIFIED: 0, + + /** + * Few matching elements. + */ + VERY_UNLIKELY: 1, + UNLIKELY: 2, + + /** + * Some matching elements. + */ + POSSIBLE: 3, + LIKELY: 4, + + /** + * Many matching elements. + */ + VERY_LIKELY: 5 +}; \ No newline at end of file diff --git a/packages/dlp/src/v2beta1/doc/doc_google_protobuf_any.js b/packages/dlp/src/v2beta1/doc/doc_google_protobuf_any.js new file mode 100644 index 00000000000..0697ec15814 --- /dev/null +++ b/packages/dlp/src/v2beta1/doc/doc_google_protobuf_any.js @@ -0,0 +1,121 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * # JSON + * + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message {@link google.protobuf.Duration}): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * @external "google.protobuf.Any" + * @property {string} typeUrl + * A URL/resource name whose content describes the type of the + * serialized protocol buffer message. + * + * For URLs which use the scheme `http`, `https`, or no scheme, the + * following restrictions and interpretations apply: + * + * * If no scheme is provided, `https` is assumed. + * * The last segment of the URL's path must represent the fully + * qualified name of the type (as in `path/google.protobuf.Duration`). + * The name should be in a canonical form (e.g., leading "." is + * not accepted). + * * An HTTP GET on the URL must yield a {@link google.protobuf.Type} + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * @property {string} value + * Must be a valid serialized protocol buffer of the above specified type. + * + * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} + */ \ No newline at end of file diff --git a/packages/dlp/src/v2beta1/doc/doc_google_protobuf_timestamp.js b/packages/dlp/src/v2beta1/doc/doc_google_protobuf_timestamp.js new file mode 100644 index 00000000000..ed8fc627b92 --- /dev/null +++ b/packages/dlp/src/v2beta1/doc/doc_google_protobuf_timestamp.js @@ -0,0 +1,88 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * A Timestamp represents a point in time independent of any time zone + * or calendar, represented as seconds and fractions of seconds at + * nanosecond resolution in UTC Epoch time. It is encoded using the + * Proleptic Gregorian Calendar which extends the Gregorian calendar + * backwards to year one. It is encoded assuming all minutes are 60 + * seconds long, i.e. leap seconds are "smeared" so that no leap second + * table is needed for interpretation. Range is from + * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. + * By restricting to that range, we ensure that we can convert to + * and from RFC 3339 date strings. + * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * + * Example 5: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * @external "google.protobuf.Timestamp" + * @property {number} seconds + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * + * @property {number} nanos + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * + * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} + */ \ No newline at end of file diff --git a/packages/dlp/src/v2beta1/doc/doc_google_rpc_status.js b/packages/dlp/src/v2beta1/doc/doc_google_rpc_status.js new file mode 100644 index 00000000000..c85f1befe90 --- /dev/null +++ b/packages/dlp/src/v2beta1/doc/doc_google_rpc_status.js @@ -0,0 +1,92 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * The `Status` type defines a logical error model that is suitable for different + * programming environments, including REST APIs and RPC APIs. It is used by + * [gRPC](https://github.com/grpc). The error model is designed to be: + * + * - Simple to use and understand for most users + * - Flexible enough to meet unexpected needs + * + * # Overview + * + * The `Status` message contains three pieces of data: error code, error message, + * and error details. The error code should be an enum value of + * {@link google.rpc.Code}, but it may accept additional error codes if needed. The + * error message should be a developer-facing English message that helps + * developers *understand* and *resolve* the error. If a localized user-facing + * error message is needed, put the localized message in the error details or + * localize it in the client. The optional error details may contain arbitrary + * information about the error. There is a predefined set of error detail types + * in the package `google.rpc` which can be used for common error conditions. + * + * # Language mapping + * + * The `Status` message is the logical representation of the error model, but it + * is not necessarily the actual wire format. When the `Status` message is + * exposed in different client libraries and different wire protocols, it can be + * mapped differently. For example, it will likely be mapped to some exceptions + * in Java, but more likely mapped to some error codes in C. + * + * # Other uses + * + * The error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a + * consistent developer experience across different environments. + * + * Example uses of this error model include: + * + * - Partial errors. If a service needs to return partial errors to the client, + * it may embed the `Status` in the normal response to indicate the partial + * errors. + * + * - Workflow errors. A typical workflow has multiple steps. Each step may + * have a `Status` message for error reporting purpose. + * + * - Batch operations. If a client uses batch request and batch response, the + * `Status` message should be used directly inside batch response, one for + * each error sub-response. + * + * - Asynchronous operations. If an API call embeds asynchronous operation + * results in its response, the status of those operations should be + * represented directly using the `Status` message. + * + * - Logging. If some API errors are stored in logs, the message `Status` could + * be used directly after any stripping needed for security/privacy reasons. + * + * @external "google.rpc.Status" + * @property {number} code + * The status code, which should be an enum value of {@link google.rpc.Code}. + * + * @property {string} message + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * {@link google.rpc.Status.details} field, or localized by the client. + * + * @property {Object[]} details + * A list of messages that carry the error details. There will be a + * common set of message types for APIs to use. + * + * This object should have the same structure as [google.protobuf.Any]{@link external:"google.protobuf.Any"} + * + * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} + */ \ No newline at end of file diff --git a/packages/dlp/src/v2beta1/doc/doc_storage.js b/packages/dlp/src/v2beta1/doc/doc_storage.js new file mode 100644 index 00000000000..82ed5fe4258 --- /dev/null +++ b/packages/dlp/src/v2beta1/doc/doc_storage.js @@ -0,0 +1,310 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Note: this file is purely for documentation. Any contents are not expected + * to be loaded as the JS file. + */ + +/** + * Type of information detected by the API. + * + * @property {string} name + * Name of the information type. For built-in info types, this is provided by + * the API call ListInfoTypes. For user-defined info types, this is + * provided by the user. All user-defined info types must have unique names, + * and cannot conflict with built-in info type names. + * + * @class + * @see [google.privacy.dlp.v2beta1.InfoType definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var InfoType = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * General identifier of a data field in a storage service. + * + * @property {string} columnName + * Column name describing the field. + * + * @class + * @see [google.privacy.dlp.v2beta1.FieldId definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var FieldId = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Datastore partition ID. + * A partition ID identifies a grouping of entities. The grouping is always + * by project and namespace, however the namespace ID may be empty. + * + * A partition ID contains several dimensions: + * project ID and namespace ID. + * + * @property {string} projectId + * The ID of the project to which the entities belong. + * + * @property {string} namespaceId + * If not empty, the ID of the namespace to which the entities belong. + * + * @class + * @see [google.privacy.dlp.v2beta1.PartitionId definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var PartitionId = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A representation of a Datastore kind. + * + * @property {string} name + * The name of the kind. + * + * @class + * @see [google.privacy.dlp.v2beta1.KindExpression definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var KindExpression = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A reference to a property relative to the Datastore kind expressions. + * + * @property {string} name + * The name of the property. + * If name includes "."s, it may be interpreted as a property name path. + * + * @class + * @see [google.privacy.dlp.v2beta1.PropertyReference definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var PropertyReference = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A representation of a Datastore property in a projection. + * + * @property {Object} property + * The property to project. + * + * This object should have the same structure as [PropertyReference]{@link PropertyReference} + * + * @class + * @see [google.privacy.dlp.v2beta1.Projection definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var Projection = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Options defining a data set within Google Cloud Datastore. + * + * @property {Object} partitionId + * A partition ID identifies a grouping of entities. The grouping is always + * by project and namespace, however the namespace ID may be empty. + * + * This object should have the same structure as [PartitionId]{@link PartitionId} + * + * @property {Object} kind + * The kind to process. + * + * This object should have the same structure as [KindExpression]{@link KindExpression} + * + * @property {Object[]} projection + * Properties to scan. If none are specified, all properties will be scanned + * by default. + * + * This object should have the same structure as [Projection]{@link Projection} + * + * @class + * @see [google.privacy.dlp.v2beta1.DatastoreOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var DatastoreOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Options defining a file or a set of files (path ending with *) within + * a Google Cloud Storage bucket. + * + * @property {Object} fileSet + * This object should have the same structure as [FileSet]{@link FileSet} + * + * @class + * @see [google.privacy.dlp.v2beta1.CloudStorageOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var CloudStorageOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Set of files to scan. + * + * @property {string} url + * The url, in the format `gs:///`. Trailing wildcard in the + * path is allowed. + * + * @class + * @see [google.privacy.dlp.v2beta1.CloudStorageOptions.FileSet definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ + FileSet: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * A location in Cloud Storage. + * + * @property {string} path + * The url, in the format of `gs://bucket/`. + * + * @class + * @see [google.privacy.dlp.v2beta1.CloudStoragePath definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var CloudStoragePath = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Shared message indicating Cloud storage type. + * + * @property {Object} datastoreOptions + * Google Cloud Datastore options specification. + * + * This object should have the same structure as [DatastoreOptions]{@link DatastoreOptions} + * + * @property {Object} cloudStorageOptions + * Google Cloud Storage options specification. + * + * This object should have the same structure as [CloudStorageOptions]{@link CloudStorageOptions} + * + * @class + * @see [google.privacy.dlp.v2beta1.StorageConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var StorageConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Record key for a finding in a Cloud Storage file. + * + * @property {string} filePath + * Path to the file. + * + * @property {number} startOffset + * Byte offset of the referenced data in the file. + * + * @class + * @see [google.privacy.dlp.v2beta1.CloudStorageKey definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var CloudStorageKey = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Record key for a finding in Cloud Datastore. + * + * @property {Object} entityKey + * Datastore entity key. + * + * This object should have the same structure as [Key]{@link Key} + * + * @class + * @see [google.privacy.dlp.v2beta1.DatastoreKey definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var DatastoreKey = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A unique identifier for a Datastore entity. + * If a key's partition ID or any of its path kinds or names are + * reserved/read-only, the key is reserved/read-only. + * A reserved/read-only key is forbidden in certain documented contexts. + * + * @property {Object} partitionId + * Entities are partitioned into subsets, currently identified by a project + * ID and namespace ID. + * Queries are scoped to a single partition. + * + * This object should have the same structure as [PartitionId]{@link PartitionId} + * + * @property {Object[]} path + * The entity path. + * An entity path consists of one or more elements composed of a kind and a + * string or numerical identifier, which identify entities. The first + * element identifies a _root entity_, the second element identifies + * a _child_ of the root entity, the third element identifies a child of the + * second entity, and so forth. The entities identified by all prefixes of + * the path are called the element's _ancestors_. + * + * A path can never be empty, and a path can have at most 100 elements. + * + * This object should have the same structure as [PathElement]{@link PathElement} + * + * @class + * @see [google.privacy.dlp.v2beta1.Key definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var Key = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * A (kind, ID/name) pair used to construct a key path. + * + * If either name or ID is set, the element is complete. + * If neither is set, the element is incomplete. + * + * @property {string} kind + * The kind of the entity. + * A kind matching regex `__.*__` is reserved/read-only. + * A kind must not contain more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + * + * @property {number} id + * The auto-allocated ID of the entity. + * Never equal to zero. Values less than zero are discouraged and may not + * be supported in the future. + * + * @property {string} name + * The name of the entity. + * A name matching regex `__.*__` is reserved/read-only. + * A name must not be more than 1500 bytes when UTF-8 encoded. + * Cannot be `""`. + * + * @class + * @see [google.privacy.dlp.v2beta1.Key.PathElement definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ + PathElement: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * Message for a unique key indicating a record that contains a finding. + * + * @property {Object} cloudStorageKey + * This object should have the same structure as [CloudStorageKey]{@link CloudStorageKey} + * + * @property {Object} datastoreKey + * This object should have the same structure as [DatastoreKey]{@link DatastoreKey} + * + * @class + * @see [google.privacy.dlp.v2beta1.RecordKey definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2beta1/storage.proto} + */ +var RecordKey = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file